Enum KickReason

All Implemented Interfaces:
Serializable, Comparable<KickReason>, java.lang.constant.Constable

public enum KickReason extends Enum<KickReason>
The reason why a player has left an arena.

Used by inter alia Arena.kickPlayer(org.bukkit.entity.Player, KickReason) and PlayerQuitArenaEvent.getReason()

  • Enum Constant Details

    • LEAVE

      public static final KickReason LEAVE
      Player left the arena
    • KICK

      public static final KickReason KICK
      Player got kicked by e.g. /bw kick

      public static final KickReason ARENA_STOP
      Arena is being stopped

      public static final KickReason GAME_LOSE
      Player died ingame while his bed was broken
    • GAME_END

      public static final KickReason GAME_END
      Player got kicked as the game ended (e.g. post ArenaStatus.END_LOBBY phase)

      public static final KickReason LOBBY_NEED_SLOT
      Player got kicked during lobby phase as someone with a higher role wants to join the full arena

      public static final KickReason VOTING_SWITCH_ARENA
      Voting has ended and player got moved to the new arena

      public static final KickReason PARTY_SWITCH_ARENA
      A party plugin caused the player to switch from one arena to another

      public static final KickReason FORCE_SWITCH_ARENA
      AddRemotePlayerInfo.setForcefully(boolean) forced him to switch to another arena

      public static final KickReason SPECTATE
      Player wants to spectate, even though he is still a part of match, whereby he gets kicked from the running match

      public static final KickReason SPECTATE_ITEM_NEXT_ROUND
    • DEBUG

      @Deprecated public static final KickReason DEBUG
      Doesn't eliminate the team and doesn't stop the game. Only for debugging purposes.
    • PLUGIN

      public static final KickReason PLUGIN
      A plugin has kicked the player
  • Method Details

    • values

      public static KickReason[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static KickReason valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getMatchingSpectatorKickReason

      public KickSpectatorReason getMatchingSpectatorKickReason()
      The used reason for when a playing spectator gets kicked.

      It is possible for players to be spectators and regular players at the same time (e.g. during death spectate). In case the player gets kicked (using e.g. Arena.kickPlayer(Player)), the spectating instance gets kicked as well. The matching KickSpectatorReason gets obtained using this method.

      Used spectator kick reason when the player gets kicked
    • isApplyingStoredInventory

      public boolean isApplyingStoredInventory()
      Get whether the player's stored inventory does get applied with this reason.

      Depending on the server's configuration, the players inventory is being backed up before he spectates an arena. And when he leaves, it is possibly being applied again. This might not happen every time, as this could possibly cause bugs.

      Whether the player's backed up inventory would get applied again
    • isTeleportingToHub

      public boolean isTeleportingToHub()
      Get whether the player is being teleported to the hub with this reason.

      It may not neccessary, or might even cause bugs, if the player would get teleported in these scenarios.

      Note that other factors

      Whether the player would get teleported with this reason