Package net.minecraft.commands.execution
Class CustomCommandExecutor.WithErrorHandling<T extends ExecutionCommandSource<T>>
java.lang.Object
net.minecraft.commands.execution.CustomCommandExecutor.WithErrorHandling<T>
- All Implemented Interfaces:
CustomCommandExecutor<T>
- Direct Known Subclasses:
DebugCommand.TraceCustomExecutor
,FunctionCommand.FunctionCustomExecutor
- Enclosing interface:
CustomCommandExecutor<T>
public abstract static class CustomCommandExecutor.WithErrorHandling<T extends ExecutionCommandSource<T>>
extends Object
implements CustomCommandExecutor<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.commands.execution.CustomCommandExecutor
CustomCommandExecutor.CommandAdapter<T>, CustomCommandExecutor.WithErrorHandling<T extends ExecutionCommandSource<T>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
onError
(com.mojang.brigadier.exceptions.CommandSyntaxException error, T source, ChainModifiers chainModifiers, TraceCallbacks traceCallbacks) final void
run
(T source, com.mojang.brigadier.context.ContextChain<T> contextChain, ChainModifiers chainModifiers, ExecutionControl<T> executionControl) protected abstract void
runGuarded
(T source, com.mojang.brigadier.context.ContextChain<T> contextChain, ChainModifiers chainModifiers, ExecutionControl<T> executionControl)
-
Constructor Details
-
WithErrorHandling
public WithErrorHandling()
-
-
Method Details
-
run
public final void run(T source, com.mojang.brigadier.context.ContextChain<T> contextChain, ChainModifiers chainModifiers, ExecutionControl<T> executionControl) - Specified by:
run
in interfaceCustomCommandExecutor<T extends ExecutionCommandSource<T>>
-
onError
protected void onError(com.mojang.brigadier.exceptions.CommandSyntaxException error, T source, ChainModifiers chainModifiers, @Nullable TraceCallbacks traceCallbacks) -
runGuarded
protected abstract void runGuarded(T source, com.mojang.brigadier.context.ContextChain<T> contextChain, ChainModifiers chainModifiers, ExecutionControl<T> executionControl) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-