From 83f7aa544d8895e726d2a7b6cfa7212ab09f8ab4 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sat, 21 Feb 2015 18:30:55 +1100 Subject: [PATCH] cmds --- .../java/com/intellectualcrafters/plot/commands/Auto.java | 2 +- .../main/java/com/intellectualcrafters/plot/commands/Ban.java | 2 +- .../main/java/com/intellectualcrafters/plot/commands/Buy.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Claim.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Clear.java | 2 +- .../com/intellectualcrafters/plot/commands/Clipboard.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Cluster.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Comment.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Condense.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Copy.java | 2 +- .../plot/commands/CreateRoadSchematic.java | 2 +- .../java/com/intellectualcrafters/plot/commands/DEOP.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Database.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Debug.java | 2 +- .../intellectualcrafters/plot/commands/DebugClaimTest.java | 2 +- .../com/intellectualcrafters/plot/commands/DebugClear.java | 2 +- .../com/intellectualcrafters/plot/commands/DebugExec.java | 2 +- .../com/intellectualcrafters/plot/commands/DebugFixFlags.java | 2 +- .../com/intellectualcrafters/plot/commands/DebugLoadTest.java | 2 +- .../intellectualcrafters/plot/commands/DebugRoadRegen.java | 2 +- .../com/intellectualcrafters/plot/commands/DebugSaveTest.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Delete.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Denied.java | 2 +- .../java/com/intellectualcrafters/plot/commands/FlagCmd.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Help.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Helpers.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Home.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Inbox.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Info.java | 2 +- .../com/intellectualcrafters/plot/commands/Inventory.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Kick.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Merge.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Move.java | 2 +- .../intellectualcrafters/plot/commands/MusicSubcommand.java | 2 +- .../main/java/com/intellectualcrafters/plot/commands/OP.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Paste.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Purge.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Rate.java | 2 +- .../com/intellectualcrafters/plot/commands/RegenAllRoads.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Reload.java | 2 +- .../com/intellectualcrafters/plot/commands/Schematic.java | 2 +- .../main/java/com/intellectualcrafters/plot/commands/Set.java | 2 +- .../java/com/intellectualcrafters/plot/commands/SetOwner.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Setup.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Swap.java | 2 +- .../main/java/com/intellectualcrafters/plot/commands/TP.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Target.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Template.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Trim.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Trusted.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Unban.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Unclaim.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Unlink.java | 4 ++-- .../java/com/intellectualcrafters/plot/commands/Visit.java | 2 +- .../com/intellectualcrafters/plot/commands/WE_Anywhere.java | 3 ++- .../java/com/intellectualcrafters/plot/commands/list.java | 2 +- .../java/com/intellectualcrafters/plot/commands/plugin.java | 2 +- 57 files changed, 59 insertions(+), 58 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java index df81089b7..db3cf7333 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Auto.java @@ -76,7 +76,7 @@ public class Auto extends SubCommand { // TODO auto claim a mega plot with schematic @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { World world; int size_x = 1; int size_z = 1; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java index b8ea0de8c..77b14d668 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Ban.java @@ -17,7 +17,7 @@ public class Ban extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 1) { return BukkitPlayerFunctions.sendMessage(plr, "&cUsage: &c" + this.usage); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Buy.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Buy.java index a757c88b1..d416a13df 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Buy.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Buy.java @@ -46,7 +46,7 @@ public class Buy extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (!PlotSquared.useEconomy) { return sendMessage(plr, C.ECON_DISABLED); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java index 1e2604998..cc53a7017 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Claim.java @@ -83,7 +83,7 @@ public class Claim extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { String schematic = ""; if (args.length >= 1) { schematic = args[0]; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clear.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clear.java index ef54fc659..d74c1f50e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clear.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clear.java @@ -38,7 +38,7 @@ public class Clear extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (plr == null) { // Is console if (args.length < 2) { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clipboard.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clipboard.java index 4cb00e79b..7dea2cae8 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clipboard.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Clipboard.java @@ -32,7 +32,7 @@ public class Clipboard extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (!currentSelection.containsKey(plr.getName())) { return sendMessage(plr, C.NO_CLIPBOARD); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java index e2377d85a..bc66f6e7c 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Cluster.java @@ -51,7 +51,7 @@ public class Cluster extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { // list, create, delete, resize, invite, kick, leave, helpers, tp, sethome if (args.length == 0) { // return arguments diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Comment.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Comment.java index a1272e78a..b84ba14ad 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Comment.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Comment.java @@ -39,7 +39,7 @@ public class Comment extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (!BukkitPlayerFunctions.isInPlot(plr)) { return sendMessage(plr, C.NOT_IN_PLOT); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Condense.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Condense.java index 5b61ac92b..4e3d2b5e7 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Condense.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Condense.java @@ -46,7 +46,7 @@ public class Condense extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (plr != null) { BukkitPlayerFunctions.sendMessage(plr, (C.NOT_CONSOLE)); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java index 951e55ceb..bee9fc59b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Copy.java @@ -35,7 +35,7 @@ public class Copy extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (!BukkitPlayerFunctions.isInPlot(plr)) { BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java index 8c30f8dfc..2c52265ca 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/CreateRoadSchematic.java @@ -36,7 +36,7 @@ public class CreateRoadSchematic extends SubCommand { } @Override - public boolean execute(final Player player, final String... args) { + public boolean execute(final PlotPlayer player, final String... args) { if (!BukkitPlayerFunctions.isInPlot(player)) { MainUtil.sendMessage(BukkitUtil.getPlayer(player), C.NOT_IN_PLOT); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DEOP.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DEOP.java index bd055260b..3c8136c0e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DEOP.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DEOP.java @@ -17,7 +17,7 @@ public class DEOP extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 1) { return BukkitPlayerFunctions.sendMessage(plr, "&cUsage: &c" + this.usage); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Database.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Database.java index b57efa460..5170c15e3 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Database.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Database.java @@ -71,7 +71,7 @@ public class Database extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 1) { return sendMessage(plr, "/plot database [sqlite/mysql]"); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java index 65716a4d4..e58249162 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Debug.java @@ -37,7 +37,7 @@ public class Debug extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if ((args.length > 0) && args[0].equalsIgnoreCase("msg")) { final StringBuilder msg = new StringBuilder(); for (final C c : C.values()) { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java index b8552ff9d..e4532c5c7 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClaimTest.java @@ -73,7 +73,7 @@ public class DebugClaimTest extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (plr == null) { if (args.length < 3) { return !BukkitPlayerFunctions.sendMessage(null, "If you accidentally delete your database, this command will attempt to restore all plots based on the data from the plot signs. \n\n&cMissing world arg /plot debugclaimtest {world} {PlotId min} {PlotId max}"); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java index b2aa400a2..6126d374a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugClear.java @@ -42,7 +42,7 @@ public class DebugClear extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (plr == null) { // Is console if (args.length < 2) { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java index 3dc5767e7..bfcf6e597 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugExec.java @@ -50,7 +50,7 @@ public class DebugExec extends SubCommand { } @Override - public boolean execute(final Player player, final String... args) { + public boolean execute(final PlotPlayer player, final String... args) { final List allowed_params = Arrays.asList(new String[] { "stop-expire", "start-expire", "show-expired", "update-expired", "seen", "trim-check" }); if (args.length > 0) { final String arg = args[0].toLowerCase(); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugFixFlags.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugFixFlags.java index 156b96f32..f2ce2ad51 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugFixFlags.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugFixFlags.java @@ -42,7 +42,7 @@ public class DebugFixFlags extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (plr != null) { BukkitPlayerFunctions.sendMessage(plr, C.NOT_CONSOLE); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java index d45698f46..7a9e7a673 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugLoadTest.java @@ -37,7 +37,7 @@ public class DebugLoadTest extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (plr == null) { try { final Field fPlots = PlotSquared.class.getDeclaredField("plots"); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java index f5f47d33a..2085f7702 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugRoadRegen.java @@ -38,7 +38,7 @@ public class DebugRoadRegen extends SubCommand { } @Override - public boolean execute(final Player player, final String... args) { + public boolean execute(final PlotPlayer player, final String... args) { if (!(PlotSquared.getPlotWorld(player.getWorld()) instanceof HybridPlotWorld)) { return sendMessage(player, C.NOT_IN_PLOT_WORLD); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java index a1d956532..9b9c49bc7 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/DebugSaveTest.java @@ -38,7 +38,7 @@ public class DebugSaveTest extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (plr == null) { final ArrayList plots = new ArrayList(); plots.addAll(PlotSquared.getPlots()); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Delete.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Delete.java index b27c20dc2..50c603058 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Delete.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Delete.java @@ -39,7 +39,7 @@ public class Delete extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (!BukkitPlayerFunctions.isInPlot(plr)) { return !sendMessage(plr, C.NOT_IN_PLOT); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java index 12c2730a5..f24c010e2 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Denied.java @@ -40,7 +40,7 @@ public class Denied extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 2) { BukkitPlayerFunctions.sendMessage(plr, C.DENIED_NEED_ARGUMENT); return true; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java index 1111822c6..a67c73fe0 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/FlagCmd.java @@ -44,7 +44,7 @@ public class FlagCmd extends SubCommand { } @Override - public boolean execute(final Player player, final String... args) { + public boolean execute(final PlotPlayer player, final String... args) { /* * plot flag set fly true * plot flag remove fly diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Help.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Help.java index e8dac809a..1f6879a41 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Help.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Help.java @@ -15,7 +15,7 @@ public class Help extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { return false; } } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java index 64a8d5c2f..7f545edff 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Helpers.java @@ -39,7 +39,7 @@ public class Helpers extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 2) { BukkitPlayerFunctions.sendMessage(plr, C.HELPER_NEED_ARGUMENT); return true; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java index 832007503..4578173a2 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Home.java @@ -46,7 +46,7 @@ public class Home extends SubCommand { } @Override - public boolean execute(final Player plr, String... args) { + public boolean execute(final PlotPlayer plr, String... args) { final Plot[] plots = PlotSquared.getPlots(plr).toArray(new Plot[0]); if (plots.length == 1) { PlotSquared.teleportPlayer(plr, plr.getLocation(), plots[0]); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java index 4fb2cc82c..b0be4d72c 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java @@ -43,7 +43,7 @@ public class Inbox extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { boolean report = false; if (args.length == 1) { if (args[0].equalsIgnoreCase("reports")) { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java index 459e70ea2..d0d6f6734 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Info.java @@ -52,7 +52,7 @@ public class Info extends SubCommand { } @Override - public boolean execute(final Player player, String... args) { + public boolean execute(final PlotPlayer player, String... args) { World world; Plot plot; if (player != null) { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inventory.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inventory.java index 119c75766..21bde1b6a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inventory.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Inventory.java @@ -35,7 +35,7 @@ public class Inventory extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { final ArrayList cmds = new ArrayList<>(); for (final SubCommand cmd : MainCommand.subCommands) { if (cmd.permission.hasPermission(plr)) { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java index 7be8d38dd..ffb5d1ba4 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java @@ -36,7 +36,7 @@ public class Kick extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (!BukkitPlayerFunctions.isInPlot(plr)) { BukkitPlayerFunctions.sendMessage(plr, "You're not in a plot."); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Merge.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Merge.java index de582fdf9..eb4d94d4a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Merge.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Merge.java @@ -74,7 +74,7 @@ public class Merge extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (!BukkitPlayerFunctions.isInPlot(plr)) { BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT); return true; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Move.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Move.java index 485e59fe7..d2e3303cd 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Move.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Move.java @@ -38,7 +38,7 @@ public class Move extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (plr == null) { BukkitPlayerFunctions.sendMessage(plr, "MUST BE EXECUTED BY PLAYER"); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java index a261ef6ed..eb16571f5 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/MusicSubcommand.java @@ -39,7 +39,7 @@ public class MusicSubcommand extends SubCommand { } @Override - public boolean execute(final Player player, final String... args) { + public boolean execute(final PlotPlayer player, final String... args) { if (!BukkitPlayerFunctions.isInPlot(player)) { sendMessage(player, C.NOT_IN_PLOT); return true; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/OP.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/OP.java index 4dd26c6df..0eae5aa07 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/OP.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/OP.java @@ -17,7 +17,7 @@ public class OP extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 1) { return BukkitPlayerFunctions.sendMessage(plr, "&cUsage: &c" + this.usage); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Paste.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Paste.java index 7d165a62f..14f740509 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Paste.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Paste.java @@ -35,7 +35,7 @@ public class Paste extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (!BukkitPlayerFunctions.isInPlot(plr)) { BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java index 14baa41c5..a0998e0b8 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java @@ -53,7 +53,7 @@ public class Purge extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (plr != null) { BukkitPlayerFunctions.sendMessage(plr, (C.NOT_CONSOLE)); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Rate.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Rate.java index adf401365..eeed3d23f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Rate.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Rate.java @@ -39,7 +39,7 @@ public class Rate extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 1) { sendMessage(plr, C.RATING_NOT_VALID); return true; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java index b93c3cfeb..8dfade597 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/RegenAllRoads.java @@ -39,7 +39,7 @@ public class RegenAllRoads extends SubCommand { } @Override - public boolean execute(final Player player, final String... args) { + public boolean execute(final PlotPlayer player, final String... args) { if (player != null) { sendMessage(player, C.NOT_CONSOLE); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java index cf82c6376..54b8159fe 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java @@ -34,7 +34,7 @@ public class Reload extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { try { // The following won't affect world generation, as that has to be // loaded during startup unfortunately. diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Schematic.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Schematic.java index 61920af69..f3893f799 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Schematic.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Schematic.java @@ -55,7 +55,7 @@ public class Schematic extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 1) { sendMessage(plr, C.SCHEMATIC_MISSING_ARG); return true; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java index 3e142d6d0..af1a7751b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Set.java @@ -64,7 +64,7 @@ public class Set extends SubCommand { @SuppressWarnings("deprecation") @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (!BukkitPlayerFunctions.isInPlot(plr)) { BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java index ddfe50082..ea00c912b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/SetOwner.java @@ -51,7 +51,7 @@ public class SetOwner extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { final Plot plot = BukkitPlayerFunctions.getCurrentPlot(plr); if ((plot == null) || (plot.owner == null)) { BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Setup.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Setup.java index 64344c33e..826e8fd98 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Setup.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Setup.java @@ -84,7 +84,7 @@ public class Setup extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { // going through setup final String name = plr.getName(); if (!setupMap.containsKey(name)) { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Swap.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Swap.java index 5a71ea0a5..fb3955a3e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Swap.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Swap.java @@ -44,7 +44,7 @@ public class Swap extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 1) { BukkitPlayerFunctions.sendMessage(plr, C.NEED_PLOT_ID); BukkitPlayerFunctions.sendMessage(plr, C.SWAP_SYNTAX); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/TP.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/TP.java index 5dace5842..fe2220419 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/TP.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/TP.java @@ -41,7 +41,7 @@ public class TP extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 1) { BukkitPlayerFunctions.sendMessage(plr, C.NEED_PLOT_ID); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Target.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Target.java index 957aa2f92..22ce9cd21 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Target.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Target.java @@ -35,7 +35,7 @@ public class Target extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (!PlotSquared.isPlotWorld(plr.getWorld())) { BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT_WORLD); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Template.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Template.java index 55068666f..99817ab8e 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Template.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Template.java @@ -40,7 +40,7 @@ public class Template extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length != 2) { BukkitPlayerFunctions.sendMessage(plr, C.COMMAND_SYNTAX, "/plot template "); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trim.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trim.java index 612baa903..c81645695 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trim.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trim.java @@ -61,7 +61,7 @@ public class Trim extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (plr != null) { BukkitPlayerFunctions.sendMessage(plr, (C.NOT_CONSOLE)); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java index c91a0df17..0caafc005 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Trusted.java @@ -40,7 +40,7 @@ public class Trusted extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 2) { BukkitPlayerFunctions.sendMessage(plr, C.TRUSTED_NEED_ARGUMENT); return true; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unban.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unban.java index e36dc937b..ee7cd9210 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unban.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unban.java @@ -17,7 +17,7 @@ public class Unban extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 1) { return BukkitPlayerFunctions.sendMessage(plr, "&cUsage: &c" + this.usage); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java index ea0fe0d55..aa0f11999 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java @@ -40,7 +40,7 @@ public class Unclaim extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (!BukkitPlayerFunctions.isInPlot(plr)) { return !sendMessage(plr, C.NOT_IN_PLOT); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java index 0f3159866..91b4ac28c 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unlink.java @@ -50,7 +50,7 @@ public class Unlink extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (!BukkitPlayerFunctions.isInPlot(plr)) { return sendMessage(plr, C.NOT_IN_PLOT); } @@ -69,7 +69,7 @@ public class Unlink extends SubCommand { try { MainUtil.update(plr.getLocation()); } catch (final Exception e) { - // execute(final Player plr, final String... args) { + // execute(final PlotPlayer plr, final String... args) { try { PlotSquared.log("Error on: " + getClass().getMethod("execute", Player.class, String[].class).toGenericString() + ":119, when trying to use \"SetBlockFast#update\""); } catch (final Exception ex) { diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java index 46bf43db5..ab06001db 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Visit.java @@ -47,7 +47,7 @@ public class Visit extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 1) { return sendMessage(plr, C.NEED_USER); } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java index b7688645f..c0f6f582a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/WE_Anywhere.java @@ -24,6 +24,7 @@ import org.bukkit.entity.Player; import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.PlotSquared; +import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.PWE; @@ -33,7 +34,7 @@ public class WE_Anywhere extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (PlotSquared.worldEdit == null) { BukkitPlayerFunctions.sendMessage(plr, "&cWorldEdit is not enabled on this server"); return false; diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java index a614872c7..694fee96c 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/list.java @@ -56,7 +56,7 @@ public class list extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { if (args.length < 1) { final StringBuilder builder = new StringBuilder(); builder.append(C.SUBCOMMAND_SET_OPTIONS_HEADER.s()); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java index 2f3baee99..4136ab8ac 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/plugin.java @@ -89,7 +89,7 @@ public class plugin extends SubCommand { } @Override - public boolean execute(final Player plr, final String... args) { + public boolean execute(final PlotPlayer plr, final String... args) { Bukkit.getScheduler().runTaskAsynchronously(PlotSquared.getMain(), new Runnable() { @Override public void run() {