Record Class CommandTreeCompiler.MappingCommand
java.lang.Object
java.lang.Record
com.ultikits.ultitools.command.engine.CommandTreeCompiler.MappingCommand
- All Implemented Interfaces:
com.mojang.brigadier.Command<io.papermc.paper.command.brigadier.CommandSourceStack>
- Enclosing class:
CommandTreeCompiler
static record CommandTreeCompiler.MappingCommand(Method method, List<CommandTreeCompiler.Spec> path, String empty, CommandTreeCompiler.Invocation invocation)
extends Record
implements com.mojang.brigadier.Command<io.papermc.paper.command.brigadier.CommandSourceStack>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theemptyrecord component.private final CommandTreeCompiler.InvocationThe field for theinvocationrecord component.private final MethodThe field for themethodrecord component.private final List<CommandTreeCompiler.Spec> The field for thepathrecord component.Fields inherited from interface com.mojang.brigadier.Command
SINGLE_SUCCESS -
Constructor Summary
ConstructorsConstructorDescriptionMappingCommand(Method method, List<CommandTreeCompiler.Spec> path, String empty, CommandTreeCompiler.Invocation invocation) Creates an instance of aMappingCommandrecord class. -
Method Summary
Modifier and TypeMethodDescriptionempty()Returns the value of theemptyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinvocationrecord component.method()Returns the value of themethodrecord component.path()Returns the value of thepathrecord component.intrun(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
method
The field for themethodrecord component. -
path
The field for thepathrecord component. -
empty
The field for theemptyrecord component. -
invocation
The field for theinvocationrecord component.
-
-
Constructor Details
-
MappingCommand
MappingCommand(Method method, List<CommandTreeCompiler.Spec> path, String empty, CommandTreeCompiler.Invocation invocation) Creates an instance of aMappingCommandrecord class.- Parameters:
method- the value for themethodrecord componentpath- the value for thepathrecord componentempty- the value for theemptyrecord componentinvocation- the value for theinvocationrecord component
-
-
Method Details
-
run
public int run(com.mojang.brigadier.context.CommandContext<io.papermc.paper.command.brigadier.CommandSourceStack> context) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
runin interfacecom.mojang.brigadier.Command<io.papermc.paper.command.brigadier.CommandSourceStack>- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
empty
Returns the value of theemptyrecord component.- Returns:
- the value of the
emptyrecord component
-
invocation
Returns the value of theinvocationrecord component.- Returns:
- the value of the
invocationrecord component
-