Class PlayerSpectateEvent

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

public class PlayerSpectateEvent extends Object implements PlayerEvent
Called by the SpectateListener when a player starts spectating an entity.
  • Constructor Details

    • PlayerSpectateEvent

      public PlayerSpectateEvent(Player player, Entity target)
  • Method Details

    • getTarget

      public Entity getTarget()
    • getPlayer

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