Package dev.jorel.commandapi.arguments
Class CustomArgument.MessageBuilder
java.lang.Object
dev.jorel.commandapi.arguments.CustomArgument.MessageBuilder
- All Implemented Interfaces:
Serializable
- Enclosing class:
CustomArgument<T,B>
MessageBuilder is used to create error messages for invalid argument inputs
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a blank messageMessageBuilder(String str) Create a message with an input string -
Method Summary
Modifier and TypeMethodDescriptionAppends an object to the end of this messageAppends a string to the end of this messageAppends the argument input that the CommandSender used in this command.
For example, if/foo barwas executed and an error occurs with the CustomArgumentbar, then the arg input will appendbarto the end of the message.
This input is determined at runtime, and is stored as%input%until executedAppends the whole input that the CommandSender used in this command.
For example, if/foo barwas executed, thenfoo barwill be appended to the end of the message.
This input is determined at runtime, and is stored as%finput%until executedAppends<--[HERE]to the end of the messagetoString()Returns the String content of this MessageBuilder
-
Constructor Details
-
MessageBuilder
public MessageBuilder()Create a blank message -
MessageBuilder
Create a message with an input string- Parameters:
str- The string to start the message with
-
-
Method Details
-
appendArgInput
Appends the argument input that the CommandSender used in this command.
For example, if/foo barwas executed and an error occurs with the CustomArgumentbar, then the arg input will appendbarto the end of the message.
This input is determined at runtime, and is stored as%input%until executed- Returns:
- A reference to this object
-
appendFullInput
Appends the whole input that the CommandSender used in this command.
For example, if/foo barwas executed, thenfoo barwill be appended to the end of the message.
This input is determined at runtime, and is stored as%finput%until executed- Returns:
- A reference to this object
-
appendHere
Appends<--[HERE]to the end of the message- Returns:
- A reference to this object
-
append
Appends a string to the end of this message- Parameters:
str- The string to append to the end of this message- Returns:
- A reference to this object
-
append
Appends an object to the end of this message- Parameters:
obj- The object to append to the end of this message- Returns:
- A reference to this object
-
toString
-