Annotation Interface BracketValidator
Methods annotated with this annotation must be both public and static. Moreover, they must accept
a single parameter of type String and their return type must be a boolean. The classes containing
these methods must also be annotated with ZenRegister to allow for discovery.
The single parameter of the method is a string with the contents of the bracket handler converted to a string and
merged together, excluding the bracket handler name. It is up to the method to parse the string as it sees fit. As
an example, given a bracket validator for the handler "item" and the bracket expression
<item:minecraft:dried_kelp>, the validator will be invoked with the string
"minecraft:dried_kelp".
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
-
Element Details
-
value
String valueGets the name of the bracket handler this validator is for.- Returns:
- The name of the bracket handler.
- Since:
- 9.1.0
-