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

  • 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