Annotation Interface BracketDumper


@Documented @Retention(RUNTIME) @Target(METHOD) public @interface BracketDumper
Marks a method as being responsible for dumping all valid values for a specific bracket handler.

If not all values can be dumped, then the method should be responsible for providing the biggest subset of valid values possible. This ensures that the information provided by the dumper is complete.

Methods annotated by this annotation must be both public and static. They must have no parameters and return a Collection of Strings (i.e Collection<String>). Moreover, the classes where they are declared must be annotated with ZenRegister.

It is not necessary for a mod to manually register a method annotated with this annotation through a plugin's IBracketParserRegistrationHandler: using the annotation as described above is sufficient for CraftTweaker to handle registration automatically.

Since:
9.1.0
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Indicates the name of bracket handler for which this dumper is for.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Gets the name of the file where data will be dumped to if requested.
    Gets the name of the sub command used in /ct dump to invoke this dumper.
  • Element Details

    • value

      String value
      Indicates the name of bracket handler for which this dumper is for.
      Returns:
      The bracket handler for which this dumper is for.
      Since:
      9.1.0
    • subCommandName

      String subCommandName
      Gets the name of the sub command used in /ct dump to invoke this dumper.

      If no value or an empty string is specified, then CraftTweaker will attempt to pluralize the string returned by value().

      Returns:
      The name of the sub command to invoke this dumper.
      Since:
      9.1.0
      Default:
      ""
    • fileName

      String fileName
      Gets the name of the file where data will be dumped to if requested.

      If no value or an empty string is specified, then CraftTweaker will use the string returned by value() as the file name instead.

      Returns:
      The name of the file where data will be dumped to.
      Since:
      9.1.0
      Default:
      ""