Class PlayerRejoinGameEvent

java.lang.Object
org.bukkit.event.Event
dev.itsharshxd.zentrix.api.events.ZentrixEvent
dev.itsharshxd.zentrix.api.events.ZentrixGameEvent
dev.itsharshxd.zentrix.api.events.player.PlayerRejoinGameEvent

public final class PlayerRejoinGameEvent extends ZentrixGameEvent
Called after a player returned, through their corpse, to the running match they left.

A notification: the player is back in the match with the corpse's inventory, their experience, ender chest and team, and the corpse is gone. To refuse a return, cancel the PlayerJoinGameEvent that precedes it, whose PlayerJoinGameEvent.isRejoin() is true. Main thread; only fired while a listener is registered.

Since:
1.8.0
  • Constructor Details

    • PlayerRejoinGameEvent

      public PlayerRejoinGameEvent(@NotNull @NotNull ZentrixGame game, @NotNull @NotNull org.bukkit.entity.Player player, @Nullable @Nullable String teamId)
  • Method Details

    • getPlayer

      @NotNull public @NotNull org.bukkit.entity.Player getPlayer()
      The returning player.
    • getTeamId

      @NotNull public @NotNull Optional<String> getTeamId()
      The team they returned to, in a match played in teams.
    • getHandlers

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

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