Package me.despical.commandframework
Enum Class Message
- All Implemented Interfaces:
Serializable,Comparable<Message>,Constable
- Author:
- Despical
Created at 18.07.2024
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetColorFormatter(@NotNull Function<String, String> colorFormatter) For instance, can be used to translate Minecraft color and Hex color codes.voidsetMessage(BiFunction<Command, CommandArguments, Boolean> message) Set a custom error message.static MessageReturns the enum constant of this class with the specified name.static Message[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SHORT_ARG_SIZE
-
LONG_ARG_SIZE
-
ONLY_BY_PLAYERS
-
ONLY_BY_CONSOLE
-
NO_PERMISSION
-
MUST_HAVE_OP
-
WAIT_BEFORE_USING_AGAIN
-
-
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
-
setColorFormatter
For instance, can be used to translate Minecraft color and Hex color codes.- Parameters:
colorFormatter- the function that will be applied to the strings to colorize
-
setMessage
Set a custom error message.- Parameters:
message- the custom error message.
-