Enum Class GangCreateResult

java.lang.Object
java.lang.Enum<GangCreateResult>
dev.drawethree.xprison.api.gangs.enums.GangCreateResult
All Implemented Interfaces:
Serializable, Comparable<GangCreateResult>, Constable

public enum GangCreateResult extends Enum<GangCreateResult>
Enum representing possible results of an attempt to create a gang.
  • Enum Constant Details

    • SUCCESS

      public static final GangCreateResult SUCCESS
      Gang was created successfully.
    • NAME_RESTRICTED

      public static final GangCreateResult NAME_RESTRICTED
      Gang name is restricted and cannot be used.
    • NAME_TOO_LONG

      public static final GangCreateResult NAME_TOO_LONG
      Gang name is too long.
    • NAME_CONTAINS_COLORS

      public static final GangCreateResult NAME_CONTAINS_COLORS
      Gang name contains color codes, which are not allowed.
    • NAME_TAKEN

      public static final GangCreateResult NAME_TAKEN
      A gang with such a name already exists.
    • NAME_EMPTY

      public static final GangCreateResult NAME_EMPTY
      Gang name was not provided or is empty.
    • PLAYER_HAS_GANG

      public static final GangCreateResult PLAYER_HAS_GANG
      The player attempting to create a gang already belongs to one.
    • EVENT_CANCELLED

      public static final GangCreateResult EVENT_CANCELLED
      The creation event was cancelled during event handling.
  • Method Details

    • values

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

      public static GangCreateResult valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null