Class CommandCitizenReload

java.lang.Object
com.minecolonies.core.commands.citizencommands.CommandCitizenReload
All Implemented Interfaces:
IMCColonyOfficerCommand, IMCCommand

public class CommandCitizenReload extends Object implements IMCColonyOfficerCommand
Reloads a citizen entity from its Citizendata.
  • Constructor Details

    • CommandCitizenReload

      public CommandCitizenReload()
  • Method Details

    • onExecute

      public int onExecute(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context)
      What happens when the command is executed after preConditions are successful.
      Specified by:
      onExecute in interface IMCCommand
      Parameters:
      context - the context of the command execution
      Returns:
      1 if successful and 0 if incomplete.
    • getName

      public String getName()
      Name string of the command.
      Specified by:
      getName in interface IMCCommand
      Returns:
      the name.
    • build

      public com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> build()
      Description copied from interface: IMCCommand
      Builds the command, overwrite and add further arguments etc for nonsimple commands. When overwriting this make sure to check the preconditions.
      Specified by:
      build in interface IMCCommand
      Returns:
      the built command.