Class SpectatorStopEvent

java.lang.Object
org.bukkit.event.Event
dev.itsharshxd.zentrix.api.events.ZentrixEvent
dev.itsharshxd.zentrix.api.events.spectator.SpectatorStopEvent

public final class SpectatorStopEvent extends ZentrixEvent
Called after a player stopped spectating.

Leaving spectator mode is never optional for Zentrix, so this is a notification. By the time it fires the player is already visible and back in survival mode: in the lobby for SpectatorStopEvent.Reason.LEFT, inside their match for SpectatorStopEvent.Reason.REVIVED.

Main thread; only fired while a listener is registered.

Since:
1.8.0
  • Constructor Details

    • SpectatorStopEvent

      public SpectatorStopEvent(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull SpectatorStopEvent.Reason reason)
  • Method Details

    • getPlayer

      @NotNull public @NotNull org.bukkit.entity.Player getPlayer()
      The former spectator.
    • getReason

      @NotNull public @NotNull SpectatorStopEvent.Reason getReason()
      Why they stopped spectating.
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Description copied from class: ZentrixEvent
      Gets the handler list for this event.
      Overrides:
      getHandlers in class ZentrixEvent
      Returns:
      The handler list
    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()