Class CommandColonyResetStats

java.lang.Object
com.minecolonies.core.commands.colonycommands.CommandColonyResetStats
All Implemented Interfaces:
IMCCommand, IMCOPCommand

public class CommandColonyResetStats extends Object implements IMCOPCommand
Command to reset all colony and building statistics for a colony.
  • 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:
      onExecute in interface IMCCommand
      Parameters:
      context - the command execution context.
      Returns:
      1 when the statistics were successfully reset.
    • getName

      public String getName()
      Gets the literal name used to register this command.
      Specified by:
      getName in interface IMCCommand
      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:
      build in interface IMCCommand
      Returns:
      the command builder.