mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-11 14:55:38 +00:00
Starting to convert commands to a smarter system :3
This commit is contained in:
parent
6b229ac504
commit
e1c8dcc4be
57 changed files with 1443 additions and 726 deletions
|
@ -39,16 +39,23 @@ import com.intellectualcrafters.plot.util.BlockManager;
|
|||
import com.intellectualcrafters.plot.util.ChunkManager;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.TaskManager;
|
||||
import com.intellectualsites.commands.CommandDeclaration;
|
||||
import com.intellectualsites.commands.callers.CommandCaller;
|
||||
|
||||
@CommandDeclaration(
|
||||
command = "trim",
|
||||
permission = "plots.admin",
|
||||
description = "Delete unmodified portions of your plotworld",
|
||||
usage = "/plot trim",
|
||||
requiredType = PS.class,
|
||||
category = CommandCategory.DEBUG
|
||||
)
|
||||
public class Trim extends SubCommand {
|
||||
|
||||
public static boolean TASK = false;
|
||||
public static ArrayList<Plot> expired = null;
|
||||
private static int TASK_ID = 0;
|
||||
|
||||
public Trim() {
|
||||
super("trim", "plots.admin", "Delete unmodified portions of your plotworld", "trim", "", CommandCategory.DEBUG, false);
|
||||
}
|
||||
|
||||
public static boolean getBulkRegions(final ArrayList<ChunkLoc> empty, final String world, final Runnable whenDone) {
|
||||
if (Trim.TASK) {
|
||||
return false;
|
||||
|
@ -167,11 +174,8 @@ public class Trim extends SubCommand {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(final PlotPlayer plr, final String... args) {
|
||||
if (plr != null) {
|
||||
MainUtil.sendMessage(plr, (C.NOT_CONSOLE));
|
||||
return false;
|
||||
}
|
||||
public boolean onCommand(final CommandCaller caller, final String[] args) {
|
||||
PlotPlayer plr = null;
|
||||
if (args.length == 1) {
|
||||
final String arg = args[0].toLowerCase();
|
||||
final PlotId id = getId(arg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue