类 CommandTreeCleaner
java.lang.Object
net.minecraftforge.network.filters.CommandTreeCleaner
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static <S> com.mojang.brigadier.tree.RootCommandNode
<S> cleanArgumentTypes
(com.mojang.brigadier.tree.RootCommandNode<S> root, Predicate<com.mojang.brigadier.arguments.ArgumentType<?>> argumentTypeFilter) Cleans the command tree starting at the given root node from any argument types that do not match the given predicate.private static <S> com.mojang.brigadier.tree.CommandNode
<S> cloneNode
(com.mojang.brigadier.tree.CommandNode<S> node, Predicate<com.mojang.brigadier.tree.CommandNode<?>> nodeFilter, Map<com.mojang.brigadier.tree.CommandNode<S>, com.mojang.brigadier.tree.CommandNode<S>> newNodes) private static <S> com.mojang.brigadier.tree.CommandNode
<S> processCommandNode
(com.mojang.brigadier.tree.CommandNode<S> node, Predicate<com.mojang.brigadier.tree.CommandNode<?>> nodeFilter, Map<com.mojang.brigadier.tree.CommandNode<S>, com.mojang.brigadier.tree.CommandNode<S>> newNodes)
-
构造器详细资料
-
CommandTreeCleaner
CommandTreeCleaner()
-
-
方法详细资料
-
cleanArgumentTypes
public static <S> com.mojang.brigadier.tree.RootCommandNode<S> cleanArgumentTypes(com.mojang.brigadier.tree.RootCommandNode<S> root, Predicate<com.mojang.brigadier.arguments.ArgumentType<?>> argumentTypeFilter) Cleans the command tree starting at the given root node from any argument types that do not match the given predicate. AnyArgumentCommandNode
s that have an unmatched argument type will be stripped from the tree.- 返回:
- A new command tree, stripped of any unmatched argument types
-
processCommandNode
-
cloneNode
-