CommandAPI 9.3.0
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.arguments.CustomArgument< T, B >.MessageBuilder Class Reference

MessageBuilder is used to create error messages for invalid argument inputs. More...

+ Inheritance diagram for dev.jorel.commandapi.arguments.CustomArgument< T, B >.MessageBuilder:

Public Member Functions

 MessageBuilder ()
 Create a blank message.
 
 MessageBuilder (String str)
 Create a message with an input string. More...
 
MessageBuilder appendArgInput ()
 Appends the argument input that the CommandSender used in this command. More...
 
MessageBuilder appendFullInput ()
 Appends the whole input that the CommandSender used in this command. More...
 
MessageBuilder appendHere ()
 Appends <–[HERE] to the end of the message. More...
 
MessageBuilder append (String str)
 Appends a string to the end of this message. More...
 
MessageBuilder append (Object obj)
 Appends an object to the end of this message. More...
 
String toString ()
 Returns the String content of this MessageBuilder. More...
 

Detailed Description

MessageBuilder is used to create error messages for invalid argument inputs.

Constructor & Destructor Documentation

◆ MessageBuilder()

dev.jorel.commandapi.arguments.CustomArgument< T, B >.MessageBuilder.MessageBuilder ( String  str)

Create a message with an input string.

Parameters
strThe string to start the message with

Member Function Documentation

◆ append() [1/2]

MessageBuilder dev.jorel.commandapi.arguments.CustomArgument< T, B >.MessageBuilder.append ( Object  obj)

Appends an object to the end of this message.

Parameters
objThe object to append to the end of this message
Returns
A reference to this object

◆ append() [2/2]

MessageBuilder dev.jorel.commandapi.arguments.CustomArgument< T, B >.MessageBuilder.append ( String  str)

Appends a string to the end of this message.

Parameters
strThe string to append to the end of this message
Returns
A reference to this object

◆ appendArgInput()

MessageBuilder dev.jorel.commandapi.arguments.CustomArgument< T, B >.MessageBuilder.appendArgInput ( )

Appends the argument input that the CommandSender used in this command.


For example, if /foo bar was executed and an error occurs with the CustomArgument bar, then the arg input will append bar to 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()

MessageBuilder dev.jorel.commandapi.arguments.CustomArgument< T, B >.MessageBuilder.appendFullInput ( )

Appends the whole input that the CommandSender used in this command.


For example, if /foo bar was executed, then foo bar will 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()

MessageBuilder dev.jorel.commandapi.arguments.CustomArgument< T, B >.MessageBuilder.appendHere ( )

Appends <–[HERE] to the end of the message.

Returns
A reference to this object

◆ toString()

String dev.jorel.commandapi.arguments.CustomArgument< T, B >.MessageBuilder.toString ( )

Returns the String content of this MessageBuilder.

Returns
the String content of this MessageBuilder