Class CommandColonyResetStats
java.lang.Object
com.minecolonies.core.commands.colonycommands.CommandColonyResetStats
- All Implemented Interfaces:
IMCCommand,IMCOPCommand
Command to reset all colony and building statistics for a colony.
-
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 TypeMethodDescriptioncom.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack>build()Builds the command with its required colony selector argument.getName()Gets the literal name used to register this command.intonExecute(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context) Clears the colony-wide statistics and all statistics stored by the colony's building modules.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.IMCCommand
checkPreConditionAndExecute, checkPreConditionAndExecuteMethods inherited from interface com.minecolonies.core.commands.commandTypes.IMCOPCommand
checkPreCondition
-
Constructor Details
-
CommandColonyResetStats
public CommandColonyResetStats()
-
-
Method Details
-
onExecute
public int onExecute(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context) Clears the colony-wide statistics and all statistics stored by the colony's building modules.- Specified by:
onExecutein interfaceIMCCommand- Parameters:
context- the command execution context.- Returns:
1when the statistics were successfully reset.
-
getName
Gets the literal name used to register this command.- Specified by:
getNamein interfaceIMCCommand- Returns:
- the command name.
-
build
public com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> build()Builds the command with its required colony selector argument.- Specified by:
buildin interfaceIMCCommand- Returns:
- the command builder.
-