mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-08-04 21:45:26 +02:00
forgot to push this
This commit is contained in:
@@ -14,6 +14,7 @@ public class Chat extends SubCommand {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(PlotPlayer player, String... args) {
|
||||
return MainCommand.onCommand(player, "toggle", "chat");
|
||||
MainCommand.getInstance().toggle.chat(this, player, new String[0], null, null);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,6 @@ import com.intellectualcrafters.plot.object.RunnableVal2;
|
||||
import com.intellectualcrafters.plot.object.RunnableVal3;
|
||||
import com.intellectualcrafters.plot.util.CmdConfirm;
|
||||
import com.intellectualcrafters.plot.util.EconHandler;
|
||||
import com.intellectualcrafters.plot.util.MathMan;
|
||||
import com.intellectualcrafters.plot.util.Permissions;
|
||||
import com.plotsquared.general.commands.Command;
|
||||
import com.plotsquared.general.commands.CommandDeclaration;
|
||||
@@ -46,7 +45,8 @@ import java.util.Arrays;
|
||||
public class MainCommand extends Command {
|
||||
|
||||
private static MainCommand instance;
|
||||
private Help help;
|
||||
public Help help;
|
||||
public Toggle toggle;
|
||||
|
||||
private MainCommand() {
|
||||
super(null, true);
|
||||
@@ -75,7 +75,6 @@ public class MainCommand extends Command {
|
||||
new Auto();
|
||||
new Visit();
|
||||
new Set();
|
||||
new Toggle();
|
||||
new Clear();
|
||||
new Delete();
|
||||
new Trust();
|
||||
@@ -86,7 +85,6 @@ public class MainCommand extends Command {
|
||||
new Undeny();
|
||||
new Info();
|
||||
new ListCmd();
|
||||
instance.help = new Help(instance);
|
||||
new Debug();
|
||||
new SchematicCmd();
|
||||
new PluginCmd();
|
||||
@@ -120,13 +118,16 @@ public class MainCommand extends Command {
|
||||
new BO3();
|
||||
new Middle();
|
||||
new Grant();
|
||||
// set commands
|
||||
// Set commands
|
||||
new Owner();
|
||||
new Desc();
|
||||
new Biome();
|
||||
new Alias();
|
||||
new SetHome();
|
||||
new Cluster();
|
||||
// Referenced commands
|
||||
instance.toggle = new Toggle();
|
||||
instance.help = new Help(instance);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
@@ -155,16 +156,6 @@ public class MainCommand extends Command {
|
||||
args = tmp;
|
||||
}
|
||||
}
|
||||
{
|
||||
try {
|
||||
if (args.length == 0 || MathMan.isInteger(args[0]) || CommandCategory.valueOf(args[0].toUpperCase()) != null) {
|
||||
// This will default certain syntax to the help command
|
||||
// e.g. /plot, /plot 1, /plot claiming
|
||||
getInstance().help.execute(player, args, null, null);
|
||||
return true;
|
||||
}
|
||||
} catch (IllegalArgumentException e) {}
|
||||
}
|
||||
getInstance().execute(player, args, new RunnableVal3<Command, Runnable, Runnable>() {
|
||||
@Override
|
||||
public void run(final Command cmd, final Runnable success, final Runnable failure) {
|
||||
@@ -214,7 +205,6 @@ public class MainCommand extends Command {
|
||||
// Clear perm caching //
|
||||
player.deleteMeta("perm");
|
||||
// Optional command scope //
|
||||
String category = null;
|
||||
Location loc = null;
|
||||
Plot plot = null;
|
||||
boolean tp = false;
|
||||
|
@@ -33,7 +33,6 @@ import com.plotsquared.general.commands.CommandDeclaration;
|
||||
aliases = {"attribute"},
|
||||
permission = "plots.use",
|
||||
description = "Toggle per user settings",
|
||||
usage = "/plot toggle <setting>",
|
||||
requiredType = RequiredType.NONE,
|
||||
category = CommandCategory.SETTINGS)
|
||||
public class Toggle extends Command {
|
||||
|
@@ -43,7 +43,7 @@ import java.util.UUID;
|
||||
permission = "plots.visit",
|
||||
description = "Visit someones plot",
|
||||
usage = "/plot visit [player|alias|world|id] [#]",
|
||||
aliases = {"v", "tp", "teleport", "goto", "home"},
|
||||
aliases = {"v", "tp", "teleport", "goto", "home", "h"},
|
||||
requiredType = RequiredType.NONE,
|
||||
category = CommandCategory.TELEPORT)
|
||||
public class Visit extends SubCommand {
|
||||
|
@@ -36,7 +36,8 @@ public class WE_Anywhere extends SubCommand {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(PlotPlayer player, String[] arguments) {
|
||||
return MainCommand.onCommand(player, "plot", "toggle", "worldedit");
|
||||
MainCommand.getInstance().toggle.worldedit(this, player, new String[0], null, null);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user