Enum ArenaSelectorType

java.lang.Object
java.lang.Enum<ArenaSelectorType>
de.marcely.bedwars.api.arena.picker.ArenaSelectorType
All Implemented Interfaces:
Serializable, Comparable<ArenaSelectorType>, java.lang.constant.Constable

public enum ArenaSelectorType extends Enum<ArenaSelectorType>
The type of a selector. Diffferentiate between default and custom ones.
  • Enum Constant Details

    • RANDOM

      public static final ArenaSelectorType RANDOM
      Chooses a completely random arena
    • BEST

      public static final ArenaSelectorType BEST
      1. Filters out all full arenas
      2. Searches for the one with the most players
      3. Decides for a random one case there are multiple with the equal amount of players
    • BEST_PREFER_NON_VOTING

      public static final ArenaSelectorType BEST_PREFER_NON_VOTING
      Firstly tries to look for a voting arena, then alternatively executes BEST
    • BEST_PREFER_RUNNING

      public static final ArenaSelectorType BEST_PREFER_RUNNING
      Firstly tries to look for a running arena, then alternatively executes BEST
    • PLUGIN

      public static final ArenaSelectorType PLUGIN
      All custom added selectors have this type
  • Method Details

    • values

      public static ArenaSelectorType[] 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 ArenaSelectorType 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
    • getInstance

      @Nullable public @Nullable ArenaSelector getInstance()
      Returns the effective logic object of the given type.

      May also return null in case the plugin has not been initialized yet.

      Returns:
      The logic object. null in case it's PLUGIN.