Class SyntaxStringBuilder

java.lang.Object
ch.njol.skript.lang.SyntaxStringBuilder

public class SyntaxStringBuilder extends Object
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 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

      public SyntaxStringBuilder append(@NotNull @NotNull Object object)
      Adds an object to the string and returns the builder. Spaces are automatically added between the provided objects. If the object is a Debuggable it will be formatted using Debuggable.toString(Event, boolean).
      Parameters:
      object - The object to add.
      Returns:
      The builder.
    • append

      public SyntaxStringBuilder append(@NotNull @NotNull Object... objects)
      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

      public String toString()
      Overrides:
      toString in class Object