Interface Modifying
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.kyori.adventure.text.minimessage.tag.Tag
Tag.Argument
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Component
apply(@NotNull Component current, int depth)
Applies this transformation for the current component.default void
postVisit()
Called after the entire tree has beenvisited
.default void
visit(@NotNull Node current, int depth)
Method called once for every element in the subtree, allowing calculations to be made beforeapplication
.
-
-
-
Method Detail
-
visit
default void visit(@NotNull @NotNull Node current, int depth)
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
Component apply(@NotNull @NotNull Component current, int depth)
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
-
-