Class AddPlayerIssue

java.lang.Object
de.marcely.bedwars.api.arena.AddPlayerIssue

public class AddPlayerIssue extends Object
Reasons why a player failed to enter an arena
  • Field Details

    • FULL

      public static final AddPlayerIssue FULL
      Player failed to enter since the arena is already full
    • ALREADY_INSIDE

      public static final AddPlayerIssue ALREADY_INSIDE
      Task failed since he's already inside an arena.
    • VOTING_PARTICIPATING

      public static final AddPlayerIssue VOTING_PARTICIPATING
      Arena is a part of a voting pool.
      See Also:
    • NOT_BETA_USER

      public static final AddPlayerIssue NOT_BETA_USER
      Beta mode is enabled and player doesn't have the Permissions.BETA_USER permission.
    • LEFT_SERVER

      public static final AddPlayerIssue LEFT_SERVER
      He left the server during the join-process (e.g. if a plugin kicked him during PlayerJoinArenaEvent.
    • BROKEN_LOBBY

      public static final AddPlayerIssue BROKEN_LOBBY
      There is no lobby we can teleport to.

      One reason might be that its world has been unloaded.

  • Method Details

    • getId

      public String getId()
      Get the id of this issue that was passed during construction.

      The id should match the scenario of the issue, and never be random.

      Returns:
      The id of this issue
    • getUnformattedHintMessage

      public Message getUnformattedHintMessage()
      Get the hint message that has been passed during the construction.
      Returns:
      The original hint message instance
    • getHintMessage

      @Nullable public @Nullable Message getHintMessage(Arena arena)
      Returns the message that will be displayed to the player.

      May be null when none will be displayed in the given case.

      Parameters:
      arena - The arena to which the player has been added
      Returns:
      The message that will get displayed to the player. May be null
    • getHintMessage

      @Nullable public @Nullable Message getHintMessage(RemoteArena arena)
      Returns the message that will be displayed to the player.

      May be null when none will be displayed in the given case.

      Parameters:
      arena - The arena to which the player has been added
      Returns:
      The message that will get displayed to the player. May be null
    • construct

      public static AddPlayerIssue construct(String id, @Nullable @Nullable String hintMessage)
      Constructs a new AddPlayerIssue with the given id and hint message.

      The id should match the scenario of the issue, and never be random. Its main purpose is to make it possible for plugins to identify custom issues.

      Parameters:
      id - The id of this issue
      hintMessage - Optionally, a message that will be displayed to the player
      Returns:
      The constructed issue
    • construct

      public static AddPlayerIssue construct(String id, @Nullable @Nullable Message hintMessage)
      Constructs a new AddPlayerIssue with the given id and hint message.

      The id should match the scenario of the issue, and never be random. Its main purpose is to make it possible for plugins to identify custom issues.

      Note in case the id matches a default one: The default instance will be returned instead. The hintMessage has no affect in that case. This is to keep backwards compatibility for == matching.

      Parameters:
      id - The id of this issue
      hintMessage - Optionally, a message that will be displayed to the player
      Returns:
      The constructed issue
    • getDefaults

      public static Collection<AddPlayerIssue> getDefaults()
      Returns a collection of all default issues that are present with this class.
      Returns:
      A collection of all default issues that this plugin may make use of