Enum Class PlayerConfigGroupActionError

java.lang.Object
java.lang.Enum<PlayerConfigGroupActionError>
xaero.pac.common.player.config.group.api.PlayerConfigGroupActionError
All Implemented Interfaces:
Serializable, Comparable<PlayerConfigGroupActionError>, Constable

public enum PlayerConfigGroupActionError extends Enum<PlayerConfigGroupActionError>
Enum that defines different errors that may occur during various player group operations.
  • Enum Constant Details

    • GROUP_ALREADY_EXISTS

      public static final PlayerConfigGroupActionError GROUP_ALREADY_EXISTS
      Error returned when trying to create a group with an ID that is already used.
    • INVALID_GROUP_ID

      public static final PlayerConfigGroupActionError INVALID_GROUP_ID
      Error returned when trying to use an invalid group ID.
    • GROUP_ID_TOO_LONG

      public static final PlayerConfigGroupActionError GROUP_ID_TOO_LONG
      Error returned when trying to use a group ID that is longer than 16 characters.
    • GROUP_TO_REMOVE_NOT_FOUND

      public static final PlayerConfigGroupActionError GROUP_TO_REMOVE_NOT_FOUND
      Error returned when trying to remove a group using a group ID that isn't used.
    • GROUP_TO_EDIT_NOT_FOUND

      public static final PlayerConfigGroupActionError GROUP_TO_EDIT_NOT_FOUND
      Error returned when trying to edit a group using a group ID that isn't used.
    • MEMBER_ALREADY_INCLUDED

      public static final PlayerConfigGroupActionError MEMBER_ALREADY_INCLUDED
      Error returned when trying to include a player in a group who is already included.
    • MEMBER_NOT_FOUND

      public static final PlayerConfigGroupActionError MEMBER_NOT_FOUND
      Error returned when trying to affect a group member entry that is not in the group.
    • GROUP_INCLUSION_NOT_FOUND

      public static final PlayerConfigGroupActionError GROUP_INCLUSION_NOT_FOUND
      Error returned when trying to affect a group's group inclusion entry that is not in the group.
    • GROUP_ALREADY_INCLUDED

      public static final PlayerConfigGroupActionError GROUP_ALREADY_INCLUDED
      Error returned when trying to include a group in a group which is already included.
    • NO_EFFECT

      public static final PlayerConfigGroupActionError NO_EFFECT
      Error returned when an operation didn't necessarily fail but had no effect.
    • GROUP_COUNT_LIMIT

      public static final PlayerConfigGroupActionError GROUP_COUNT_LIMIT
      Error returned when trying to create a new group but the group count limit has been reached.
    • OUT_OF_SPACE

      public static final PlayerConfigGroupActionError OUT_OF_SPACE
      Error returned when trying to include something in a group but the group space has been exhausted for the config.
    • UNKNOWN_PLAYER

      public static final PlayerConfigGroupActionError UNKNOWN_PLAYER
      Error returned when a non-op player tries to include a player in a group who the server isn't aware of yet.

      This usually means that the player has not yet played on the server.

    • INVALID_PLAYER_NAME

      public static final PlayerConfigGroupActionError INVALID_PLAYER_NAME
      Error returned when trying to include a player in a group with a name that isn't valid.
  • Method Details

    • values

      public static PlayerConfigGroupActionError[] 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 PlayerConfigGroupActionError 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
    • shouldRefreshGroupScreen

      public boolean shouldRefreshGroupScreen()
      Gets whether this error should cause the player group screen to refresh.

      This mostly exists for internal use. I don't think you need this for anything.

      Returns:
      true if the player group screen should refresh when this error is received, otherwise false
    • getDesyncScreenMessage

      @Nullable public net.minecraft.network.chat.Component getDesyncScreenMessage()
      Gets this error's message to display on the player group screen.
      Returns:
      the error message Component, null if nothing should be displayed
    • getCommandMessage

      @Nonnull public net.minecraft.network.chat.Component getCommandMessage()
      Gets this error's message to display after using a command.
      Returns:
      the error message Component, not null