Interface Modifying
- All Superinterfaces:
Tag
A tag that can transform a whole subtree of nodes.
- Since:
- 4.10.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.text.minimessage.tag.Tag
Tag.Argument -
Method Summary
Modifier and TypeMethodDescriptionApplies this transformation for the current component.default voidCalled after the entire tree has beenvisited.default voidMethod called once for every element in the subtree, allowing calculations to be made beforeapplication.
-
Method Details
-
visit
Method called once for every element in the subtree, allowing calculations to be made beforeapplication.- Parameters:
current- the current element in the subtreedepth- depth in the tree this node is at- Since:
- 4.10.0
-
postVisit
default void postVisit()Called after the entire tree has beenvisited.This allows for finalizing calculations made during the tree visit, but before actual application to the child components of this tag.
- Since:
- 4.10.0
-
apply
Applies this transformation for the current component.This gets called after the component tree has been assembled, however, the tree can still be modified at this point if desired.
- Parameters:
current- the current componentdepth- the depth of the tree the current component is at- Returns:
- the new parent
- Since:
- 4.10.0
-