Enum SpectateReason

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

public enum SpectateReason extends Enum<SpectateReason>
Reasons or causes for someone spectating
  • Enum Constant Details

    • ENTER

      public static final SpectateReason ENTER
      Player entered manually
    • LOSE

      public static final SpectateReason LOSE
      Player lost and is now watching the game
    • DEATH

      public static final SpectateReason DEATH
      Player died and is temporarily a spectator
    • ARENA_CHANGE_FAILED

      public static final SpectateReason ARENA_CHANGE_FAILED
      Player used the "join a random arena" item as a spectator, but failed and reentered as a spectator
    • FOLLOW_PARTY

      public static final SpectateReason FOLLOW_PARTY
      Player is a member of a party and followed its leader. However, the match is already running, whereby he's spectating instead.
    • PLUGIN

      public static final SpectateReason PLUGIN
      A plugin made him into a spectator
  • Method Details

    • values

      public static SpectateReason[] 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 SpectateReason 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
    • isBackingUpInventory

      public boolean isBackingUpInventory()
      Get whether a back up of the player's inventory is being created in 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.

      Returns:
      If a backup is being created of the player's inventory
    • isDisplayingJoinMessage

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

      It might not be neccessary to display the join message (Spectator_Join) in some cases.

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