Package ch.njol.skript.lang
Class SyntaxStringBuilder
java.lang.Object
ch.njol.skript.lang.SyntaxStringBuilder
Utility class to build syntax strings, primarily intended for use
in
Debuggable.toString(Event, boolean)
implementations.
Spaces are automatically added between the provided objects.-
Constructor Summary
ConstructorDescriptionSyntaxStringBuilder
(@Nullable org.bukkit.event.Event event, boolean debug) Creates a new SyntaxStringBuilder. -
Method Summary
Modifier and TypeMethodDescriptionAdds an object to the string and returns the builder.Adds multiple objects to the string and returns the builder.toString()
-
Constructor Details
-
SyntaxStringBuilder
public SyntaxStringBuilder(@Nullable @Nullable org.bukkit.event.Event event, boolean debug) Creates a new SyntaxStringBuilder.- Parameters:
event
- The event to get information from. This is always null if debug == false.debug
- If true this should print more information, if false this should print what is shown to the end user
-
-
Method Details
-
append
Adds an object to the string and returns the builder. Spaces are automatically added between the provided objects. If the object is aDebuggable
it will be formatted usingDebuggable.toString(Event, boolean)
.- Parameters:
object
- The object to add.- Returns:
- The builder.
-
append
Adds multiple objects to the string and returns the builder. Spaces are automatically added between the provided objects.- Parameters:
objects
- The objects to add.- Returns:
- The builder.
-
toString
-