Package net.minecraft.server.function
Interface CommandFunction<T>
- All Known Implementing Classes:
ExpandedMacro,Macro
public interface CommandFunction<T>
- Mappings:
Namespace Name named net/minecraft/server/function/CommandFunctionintermediary net/minecraft/class_2158official ig
-
Method Summary
Modifier and TypeMethodDescriptionprivate static booleancontinuesToNextLine(CharSequence string) static <T extends AbstractServerCommandSource<T>>
CommandFunction<T> create(Identifier id, com.mojang.brigadier.CommandDispatcher<T> dispatcher, T source, List<String> lines) Parses a function in the context ofsource.id()static <T extends AbstractServerCommandSource<T>>
SourcedCommandAction<T> parse(com.mojang.brigadier.CommandDispatcher<T> dispatcher, T source, com.mojang.brigadier.StringReader reader) static voidvalidateCommandLength(CharSequence command) withMacroReplaced(@Nullable NbtCompound arguments, com.mojang.brigadier.CommandDispatcher<T> dispatcher)
-
Method Details
-
id
Identifier id()- Mappings:
Namespace Name Mixin selector named idLnet/minecraft/server/function/CommandFunction;id()Lnet/minecraft/util/Identifier;intermediary comp_1994Lnet/minecraft/class_2158;comp_1994()Lnet/minecraft/class_2960;official aLig;a()Lakr;
-
withMacroReplaced
Procedure<T> withMacroReplaced(@Nullable @Nullable NbtCompound arguments, com.mojang.brigadier.CommandDispatcher<T> dispatcher) throws MacroException - Throws:
MacroException- Mappings:
Namespace Name Mixin selector named withMacroReplacedLnet/minecraft/server/function/CommandFunction;withMacroReplaced(Lnet/minecraft/nbt/NbtCompound;Lcom/mojang/brigadier/CommandDispatcher;)Lnet/minecraft/server/function/Procedure;intermediary method_52595Lnet/minecraft/class_2158;method_52595(Lnet/minecraft/class_2487;Lcom/mojang/brigadier/CommandDispatcher;)Lnet/minecraft/class_8868;official aLig;a(Lub;Lcom/mojang/brigadier/CommandDispatcher;)Lii;
-
continuesToNextLine
- Mappings:
Namespace Name Mixin selector named continuesToNextLineLnet/minecraft/server/function/CommandFunction;continuesToNextLine(Ljava/lang/CharSequence;)Zintermediary method_52592Lnet/minecraft/class_2158;method_52592(Ljava/lang/CharSequence;)Zofficial bLig;b(Ljava/lang/CharSequence;)Z
-
create
static <T extends AbstractServerCommandSource<T>> CommandFunction<T> create(Identifier id, com.mojang.brigadier.CommandDispatcher<T> dispatcher, T source, List<String> lines) Parses a function in the context ofsource.Any syntax errors, such as improper comment lines or unknown commands, will be thrown at this point.
- Parameters:
lines- the raw lines (including comments) read from a function file- Mappings:
Namespace Name Mixin selector named createLnet/minecraft/server/function/CommandFunction;create(Lnet/minecraft/util/Identifier;Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/server/command/AbstractServerCommandSource;Ljava/util/List;)Lnet/minecraft/server/function/CommandFunction;intermediary method_9195Lnet/minecraft/class_2158;method_9195(Lnet/minecraft/class_2960;Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/class_8839;Ljava/util/List;)Lnet/minecraft/class_2158;official aLig;a(Lakr;Lcom/mojang/brigadier/CommandDispatcher;Lev;Ljava/util/List;)Lig;
-
validateCommandLength
- Mappings:
Namespace Name Mixin selector named validateCommandLengthLnet/minecraft/server/function/CommandFunction;validateCommandLength(Ljava/lang/CharSequence;)Vintermediary method_57057Lnet/minecraft/class_2158;method_57057(Ljava/lang/CharSequence;)Vofficial aLig;a(Ljava/lang/CharSequence;)V
-
parse
static <T extends AbstractServerCommandSource<T>> SourcedCommandAction<T> parse(com.mojang.brigadier.CommandDispatcher<T> dispatcher, T source, com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException- Mappings:
Namespace Name Mixin selector named parseLnet/minecraft/server/function/CommandFunction;parse(Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/server/command/AbstractServerCommandSource;Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/command/SourcedCommandAction;intermediary method_54417Lnet/minecraft/class_2158;method_54417(Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/class_8839;Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/class_8856;official aLig;a(Lcom/mojang/brigadier/CommandDispatcher;Lev;Lcom/mojang/brigadier/StringReader;)Lhw;
-