Package net.minecraft.server.function
Class CommandFunctionManager
java.lang.Object
net.minecraft.server.function.CommandFunctionManager
public class CommandFunctionManager extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCommandFunctionManager.Entry -
Field Summary
Fields Modifier and Type Field Description private ArrayDeque<CommandFunctionManager.Entry>chainprivate booleanexecutingprivate static IdentifierLOAD_FUNCTIONprivate FunctionLoaderloaderprivate booleanneedToRunLoadFunctionsprivate List<CommandFunctionManager.Entry>pendingprivate MinecraftServerserverprivate static IdentifierTICK_FUNCTIONprivate List<CommandFunction>tickFunctions -
Constructor Summary
Constructors Constructor Description CommandFunctionManager(MinecraftServer server, FunctionLoader loader) -
Method Summary
Modifier and Type Method Description intexecute(CommandFunction function, ServerCommandSource source)private voidexecuteAll(Collection<CommandFunction> functions, Identifier label)Iterable<Identifier>getAllFunctions()com.mojang.brigadier.CommandDispatcher<ServerCommandSource>getDispatcher()Optional<CommandFunction>getFunction(Identifier id)Iterable<Identifier>getFunctionTags()intgetMaxCommandChainLength()Tag<CommandFunction>getTaggedFunctions(Identifier tag)ServerCommandSourcegetTaggedFunctionSource()private voidinitialize(FunctionLoader loader)voidtick()voidupdate(FunctionLoader loader)Called to update the loaded functions on datapack reload.
-
Field Details
-
TICK_FUNCTION
-
LOAD_FUNCTION
-
server
-
executing
private boolean executing -
chain
-
pending
-
tickFunctions
-
needToRunLoadFunctions
private boolean needToRunLoadFunctions -
loader
-
-
Constructor Details
-
CommandFunctionManager
-
-
Method Details
-
getMaxCommandChainLength
public int getMaxCommandChainLength() -
getDispatcher
-
tick
public void tick() -
executeAll
-
execute
-
update
Called to update the loaded functions on datapack reload.- Parameters:
loader- the new loader functions will be taken from
-
initialize
-
getTaggedFunctionSource
-
getFunction
-
getTaggedFunctions
-
getAllFunctions
-
getFunctionTags
-