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
Enum that defines different errors that may occur during various player group operations.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionError returned when trying to create a group with an ID that is already used.Error returned when trying to include a group in a group which is already included.Error returned when trying to create a new group but the group count limit has been reached.Error returned when trying to use a group ID that is longer than 16 characters.Error returned when trying to affect a group's group inclusion entry that is not in the group.Error returned when trying to edit a group using a group ID that isn't used.Error returned when trying to remove a group using a group ID that isn't used.Error returned when trying to use an invalid group ID.Error returned when trying to include a player in a group with a name that isn't valid.Error returned when trying to include a player in a group who is already included.Error returned when trying to affect a group member entry that is not in the group.Error returned when an operation didn't necessarily fail but had no effect.Error returned when trying to include something in a group but the group space has been exhausted for the config.Error returned when a non-op player tries to include a player in a group who the server isn't aware of yet. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.chat.ComponentGets this error's message to display after using a command.net.minecraft.network.chat.ComponentGets this error's message to display on the player group screen.booleanGets whether this error should cause the player group screen to refresh.static PlayerConfigGroupActionErrorReturns the enum constant of this class with the specified name.static PlayerConfigGroupActionError[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GROUP_ALREADY_EXISTS
Error returned when trying to create a group with an ID that is already used. -
INVALID_GROUP_ID
Error returned when trying to use an invalid group ID. -
GROUP_ID_TOO_LONG
Error returned when trying to use a group ID that is longer than 16 characters. -
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
Error returned when trying to edit a group using a group ID that isn't used. -
MEMBER_ALREADY_INCLUDED
Error returned when trying to include a player in a group who is already included. -
MEMBER_NOT_FOUND
Error returned when trying to affect a group member entry that is not in the group. -
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
Error returned when trying to include a group in a group which is already included. -
NO_EFFECT
Error returned when an operation didn't necessarily fail but had no effect. -
GROUP_COUNT_LIMIT
Error returned when trying to create a new group but the group count limit has been reached. -
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
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
Error returned when trying to include a player in a group with a name that isn't valid.
-
-
Method Details
-
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
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 nameNullPointerException- 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
-