Class PlayerDebugSubscriptionsRequestEvent
java.lang.Object
net.minestom.server.event.player.PlayerDebugSubscriptionsRequestEvent
- All Implemented Interfaces:
Event, EntityEvent, PlayerEvent
An event wrapper for
For example by commonly pressing F3-2 for
By default, no response (
ClientDebugSubscriptionRequestPacket
which is called when any DebugSubscription is requested/removed/updated by the client
with all subscriptions in its entirety, with entries missing if unregistering from last event,
For example by commonly pressing F3-2 for
DebugSubscriptions.DEDICATED_SERVER_TICK_TIME
will be a set containing DebugSubscriptions.DEDICATED_SERVER_TICK_TIME
and requesting a DebugSubscriptions.BEES will be an event where subscriptions contains both subscriptions.
By default, no response (
DebugEventPacket) is sent by the server
and no response is required if you choose to ignore.-
Constructor Summary
ConstructorsConstructorDescriptionPlayerDebugSubscriptionsRequestEvent(Player player, Set<DebugSubscription<?>> subscriptions) Construct a newPlayerDebugSubscriptionsRequestEvent -
Method Summary
Modifier and TypeMethodDescriptionGets the player.Gets the subscriptions requested by the player.booleanChecks if there are any subscriptions requested.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PlayerEvent
getEntity
-
Constructor Details
-
PlayerDebugSubscriptionsRequestEvent
@Experimental public PlayerDebugSubscriptionsRequestEvent(Player player, Set<DebugSubscription<?>> subscriptions) Construct a newPlayerDebugSubscriptionsRequestEvent- Parameters:
player- playersubscriptions- subscriptions
-
-
Method Details
-
getSubscriptions
Gets the subscriptions requested by the player.
To determine which subscriptions were added or removed, compare this set with the previously stored one (using set difference operations)- Returns:
- the subscriptions
-
wantsSubscriptions
public boolean wantsSubscriptions()Checks if there are any subscriptions requested.- Returns:
- true if
getSubscriptions()is not empty.
-
getPlayer
Description copied from interface:PlayerEventGets the player.- Specified by:
getPlayerin interfacePlayerEvent- Returns:
- the player
-