Enum KickSpectatorReason

java.lang.Object
java.lang.Enum<KickSpectatorReason>
de.marcely.bedwars.api.game.spectator.KickSpectatorReason
All Implemented Interfaces:
Serializable, Comparable<KickSpectatorReason>, java.lang.constant.Constable

public enum KickSpectatorReason extends Enum<KickSpectatorReason>
Reasons or causes why a player stopped spectating
  • Enum Constant Details

  • Method Details

    • values

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

      public static KickSpectatorReason 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.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • 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

      Returns:
      Whether the player would get teleported with this reason
    • 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.

      Returns:
      Whether the player's backed up inventory would get applied again
    • isDisplayingLeaveMessage

      public boolean isDisplayingLeaveMessage()
      Get whether the leave message shall be sent to the player with this reason.

      It might not be neccessary to display the leave message (Spectator_Leave) in some cases.

      Returns:
      Whether the leave message shall be sent with this reason