Class PlayerDebugSubscriptionsRequestEvent

java.lang.Object
net.minestom.server.event.player.PlayerDebugSubscriptionsRequestEvent
All Implemented Interfaces:
Event, EntityEvent, PlayerEvent

public class PlayerDebugSubscriptionsRequestEvent extends Object implements PlayerEvent
An event wrapper for 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 Details

  • Method Details

    • getSubscriptions

      public @Unmodifiable Set<DebugSubscription<?>> 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

      public Player getPlayer()
      Description copied from interface: PlayerEvent
      Gets the player.
      Specified by:
      getPlayer in interface PlayerEvent
      Returns:
      the player