Class CommandUnloadForcedChunks

java.lang.Object
com.minecolonies.core.commands.generalcommands.CommandUnloadForcedChunks
All Implemented Interfaces:
IMCCommand

public class CommandUnloadForcedChunks extends Object implements IMCCommand
Cleanup task to remove the force flag from all loaded chunks.
  • Constructor Details

    • CommandUnloadForcedChunks

      public CommandUnloadForcedChunks()
  • Method Details

    • onExecute

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

      public boolean checkPreCondition(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context)
      Description copied from interface: IMCCommand
      Preconditions to check before executing
      Specified by:
      checkPreCondition in interface IMCCommand
      Parameters:
      context - the command context.
      Returns:
      true if fine.
    • getName

      public String getName()
      Name string of the command.
      Specified by:
      getName in interface IMCCommand
      Returns:
      this commands 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.