Class CommandCitizenModify
java.lang.Object
com.minecolonies.core.commands.citizencommands.CommandCitizenModify
- All Implemented Interfaces:
IMCColonyOfficerCommand,IMCCommand
Allows modifying citizen data for test purposes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.minecolonies.core.commands.commandTypes.IMCCommand
IMCCommand.ExecutionHandler -
Field Summary
Fields inherited from interface com.minecolonies.core.commands.commandTypes.IMCCommand
OP_PERM_LEVEL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> build()Builds the command, overwrite and add further arguments etc for nonsimple commands.@NotNull StringgetName()Name string of the command.intonExecute(@NotNull com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context) What happens when the command is executed after preConditions are successful.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.core.commands.commandTypes.IMCColonyOfficerCommand
checkPreConditionMethods inherited from interface com.minecolonies.core.commands.commandTypes.IMCCommand
checkPreConditionAndExecute, checkPreConditionAndExecute
-
Constructor Details
-
CommandCitizenModify
public CommandCitizenModify()
-
-
Method Details
-
onExecute
public int onExecute(@NotNull @NotNull com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context) Description copied from interface:IMCCommandWhat happens when the command is executed after preConditions are successful.- Specified by:
onExecutein interfaceIMCCommand- Parameters:
context- the context of the command execution- Returns:
- 1 if successful and 0 if incomplete.
-
getName
Description copied from interface:IMCCommandName string of the command.- Specified by:
getNamein interfaceIMCCommand- Returns:
- the name.
-
build
@NotNull public @NotNull com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> build()Description copied from interface:IMCCommandBuilds the command, overwrite and add further arguments etc for nonsimple commands. When overwriting this make sure to check the preconditions.- Specified by:
buildin interfaceIMCCommand- Returns:
- the built command.
-