This commit is contained in:
boy0001 2015-02-21 18:30:55 +11:00
parent e3f7db4906
commit 83f7aa544d
57 changed files with 59 additions and 58 deletions

View File

@ -76,7 +76,7 @@ public class Auto extends SubCommand {
// TODO auto claim a mega plot with schematic // TODO auto claim a mega plot with schematic
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
World world; World world;
int size_x = 1; int size_x = 1;
int size_z = 1; int size_z = 1;

View File

@ -17,7 +17,7 @@ public class Ban extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 1) { if (args.length < 1) {
return BukkitPlayerFunctions.sendMessage(plr, "&cUsage: &c" + this.usage); return BukkitPlayerFunctions.sendMessage(plr, "&cUsage: &c" + this.usage);
} }

View File

@ -46,7 +46,7 @@ public class Buy extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (!PlotSquared.useEconomy) { if (!PlotSquared.useEconomy) {
return sendMessage(plr, C.ECON_DISABLED); return sendMessage(plr, C.ECON_DISABLED);
} }

View File

@ -83,7 +83,7 @@ public class Claim extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
String schematic = ""; String schematic = "";
if (args.length >= 1) { if (args.length >= 1) {
schematic = args[0]; schematic = args[0];

View File

@ -38,7 +38,7 @@ public class Clear extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (plr == null) { if (plr == null) {
// Is console // Is console
if (args.length < 2) { if (args.length < 2) {

View File

@ -32,7 +32,7 @@ public class Clipboard extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (!currentSelection.containsKey(plr.getName())) { if (!currentSelection.containsKey(plr.getName())) {
return sendMessage(plr, C.NO_CLIPBOARD); return sendMessage(plr, C.NO_CLIPBOARD);
} }

View File

@ -51,7 +51,7 @@ public class Cluster extends SubCommand {
} }
@Override @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 // list, create, delete, resize, invite, kick, leave, helpers, tp, sethome
if (args.length == 0) { if (args.length == 0) {
// return arguments // return arguments

View File

@ -39,7 +39,7 @@ public class Comment extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (!BukkitPlayerFunctions.isInPlot(plr)) { if (!BukkitPlayerFunctions.isInPlot(plr)) {
return sendMessage(plr, C.NOT_IN_PLOT); return sendMessage(plr, C.NOT_IN_PLOT);
} }

View File

@ -46,7 +46,7 @@ public class Condense extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (plr != null) { if (plr != null) {
BukkitPlayerFunctions.sendMessage(plr, (C.NOT_CONSOLE)); BukkitPlayerFunctions.sendMessage(plr, (C.NOT_CONSOLE));
return false; return false;

View File

@ -35,7 +35,7 @@ public class Copy extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (!BukkitPlayerFunctions.isInPlot(plr)) { if (!BukkitPlayerFunctions.isInPlot(plr)) {
BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT); BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT);
return false; return false;

View File

@ -36,7 +36,7 @@ public class CreateRoadSchematic extends SubCommand {
} }
@Override @Override
public boolean execute(final Player player, final String... args) { public boolean execute(final PlotPlayer player, final String... args) {
if (!BukkitPlayerFunctions.isInPlot(player)) { if (!BukkitPlayerFunctions.isInPlot(player)) {
MainUtil.sendMessage(BukkitUtil.getPlayer(player), C.NOT_IN_PLOT); MainUtil.sendMessage(BukkitUtil.getPlayer(player), C.NOT_IN_PLOT);
return false; return false;

View File

@ -17,7 +17,7 @@ public class DEOP extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 1) { if (args.length < 1) {
return BukkitPlayerFunctions.sendMessage(plr, "&cUsage: &c" + this.usage); return BukkitPlayerFunctions.sendMessage(plr, "&cUsage: &c" + this.usage);
} }

View File

@ -71,7 +71,7 @@ public class Database extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 1) { if (args.length < 1) {
return sendMessage(plr, "/plot database [sqlite/mysql]"); return sendMessage(plr, "/plot database [sqlite/mysql]");
} }

View File

@ -37,7 +37,7 @@ public class Debug extends SubCommand {
} }
@Override @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")) { if ((args.length > 0) && args[0].equalsIgnoreCase("msg")) {
final StringBuilder msg = new StringBuilder(); final StringBuilder msg = new StringBuilder();
for (final C c : C.values()) { for (final C c : C.values()) {

View File

@ -73,7 +73,7 @@ public class DebugClaimTest extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (plr == null) { if (plr == null) {
if (args.length < 3) { 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}"); 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}");

View File

@ -42,7 +42,7 @@ public class DebugClear extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (plr == null) { if (plr == null) {
// Is console // Is console
if (args.length < 2) { if (args.length < 2) {

View File

@ -50,7 +50,7 @@ public class DebugExec extends SubCommand {
} }
@Override @Override
public boolean execute(final Player player, final String... args) { public boolean execute(final PlotPlayer player, final String... args) {
final List<String> allowed_params = Arrays.asList(new String[] { "stop-expire", "start-expire", "show-expired", "update-expired", "seen", "trim-check" }); final List<String> allowed_params = Arrays.asList(new String[] { "stop-expire", "start-expire", "show-expired", "update-expired", "seen", "trim-check" });
if (args.length > 0) { if (args.length > 0) {
final String arg = args[0].toLowerCase(); final String arg = args[0].toLowerCase();

View File

@ -42,7 +42,7 @@ public class DebugFixFlags extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (plr != null) { if (plr != null) {
BukkitPlayerFunctions.sendMessage(plr, C.NOT_CONSOLE); BukkitPlayerFunctions.sendMessage(plr, C.NOT_CONSOLE);
return false; return false;

View File

@ -37,7 +37,7 @@ public class DebugLoadTest extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (plr == null) { if (plr == null) {
try { try {
final Field fPlots = PlotSquared.class.getDeclaredField("plots"); final Field fPlots = PlotSquared.class.getDeclaredField("plots");

View File

@ -38,7 +38,7 @@ public class DebugRoadRegen extends SubCommand {
} }
@Override @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)) { if (!(PlotSquared.getPlotWorld(player.getWorld()) instanceof HybridPlotWorld)) {
return sendMessage(player, C.NOT_IN_PLOT_WORLD); return sendMessage(player, C.NOT_IN_PLOT_WORLD);
} }

View File

@ -38,7 +38,7 @@ public class DebugSaveTest extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (plr == null) { if (plr == null) {
final ArrayList<Plot> plots = new ArrayList<Plot>(); final ArrayList<Plot> plots = new ArrayList<Plot>();
plots.addAll(PlotSquared.getPlots()); plots.addAll(PlotSquared.getPlots());

View File

@ -39,7 +39,7 @@ public class Delete extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (!BukkitPlayerFunctions.isInPlot(plr)) { if (!BukkitPlayerFunctions.isInPlot(plr)) {
return !sendMessage(plr, C.NOT_IN_PLOT); return !sendMessage(plr, C.NOT_IN_PLOT);
} }

View File

@ -40,7 +40,7 @@ public class Denied extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 2) { if (args.length < 2) {
BukkitPlayerFunctions.sendMessage(plr, C.DENIED_NEED_ARGUMENT); BukkitPlayerFunctions.sendMessage(plr, C.DENIED_NEED_ARGUMENT);
return true; return true;

View File

@ -44,7 +44,7 @@ public class FlagCmd extends SubCommand {
} }
@Override @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 set fly true
* plot flag remove fly * plot flag remove fly

View File

@ -15,7 +15,7 @@ public class Help extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
return false; return false;
} }
} }

View File

@ -39,7 +39,7 @@ public class Helpers extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 2) { if (args.length < 2) {
BukkitPlayerFunctions.sendMessage(plr, C.HELPER_NEED_ARGUMENT); BukkitPlayerFunctions.sendMessage(plr, C.HELPER_NEED_ARGUMENT);
return true; return true;

View File

@ -46,7 +46,7 @@ public class Home extends SubCommand {
} }
@Override @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]); final Plot[] plots = PlotSquared.getPlots(plr).toArray(new Plot[0]);
if (plots.length == 1) { if (plots.length == 1) {
PlotSquared.teleportPlayer(plr, plr.getLocation(), plots[0]); PlotSquared.teleportPlayer(plr, plr.getLocation(), plots[0]);

View File

@ -43,7 +43,7 @@ public class Inbox extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
boolean report = false; boolean report = false;
if (args.length == 1) { if (args.length == 1) {
if (args[0].equalsIgnoreCase("reports")) { if (args[0].equalsIgnoreCase("reports")) {

View File

@ -52,7 +52,7 @@ public class Info extends SubCommand {
} }
@Override @Override
public boolean execute(final Player player, String... args) { public boolean execute(final PlotPlayer player, String... args) {
World world; World world;
Plot plot; Plot plot;
if (player != null) { if (player != null) {

View File

@ -35,7 +35,7 @@ public class Inventory extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
final ArrayList<SubCommand> cmds = new ArrayList<>(); final ArrayList<SubCommand> cmds = new ArrayList<>();
for (final SubCommand cmd : MainCommand.subCommands) { for (final SubCommand cmd : MainCommand.subCommands) {
if (cmd.permission.hasPermission(plr)) { if (cmd.permission.hasPermission(plr)) {

View File

@ -36,7 +36,7 @@ public class Kick extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (!BukkitPlayerFunctions.isInPlot(plr)) { if (!BukkitPlayerFunctions.isInPlot(plr)) {
BukkitPlayerFunctions.sendMessage(plr, "You're not in a plot."); BukkitPlayerFunctions.sendMessage(plr, "You're not in a plot.");
return false; return false;

View File

@ -74,7 +74,7 @@ public class Merge extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (!BukkitPlayerFunctions.isInPlot(plr)) { if (!BukkitPlayerFunctions.isInPlot(plr)) {
BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT); BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT);
return true; return true;

View File

@ -38,7 +38,7 @@ public class Move extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (plr == null) { if (plr == null) {
BukkitPlayerFunctions.sendMessage(plr, "MUST BE EXECUTED BY PLAYER"); BukkitPlayerFunctions.sendMessage(plr, "MUST BE EXECUTED BY PLAYER");
} }

View File

@ -39,7 +39,7 @@ public class MusicSubcommand extends SubCommand {
} }
@Override @Override
public boolean execute(final Player player, final String... args) { public boolean execute(final PlotPlayer player, final String... args) {
if (!BukkitPlayerFunctions.isInPlot(player)) { if (!BukkitPlayerFunctions.isInPlot(player)) {
sendMessage(player, C.NOT_IN_PLOT); sendMessage(player, C.NOT_IN_PLOT);
return true; return true;

View File

@ -17,7 +17,7 @@ public class OP extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 1) { if (args.length < 1) {
return BukkitPlayerFunctions.sendMessage(plr, "&cUsage: &c" + this.usage); return BukkitPlayerFunctions.sendMessage(plr, "&cUsage: &c" + this.usage);
} }

View File

@ -35,7 +35,7 @@ public class Paste extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (!BukkitPlayerFunctions.isInPlot(plr)) { if (!BukkitPlayerFunctions.isInPlot(plr)) {
BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT); BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT);
return false; return false;

View File

@ -53,7 +53,7 @@ public class Purge extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (plr != null) { if (plr != null) {
BukkitPlayerFunctions.sendMessage(plr, (C.NOT_CONSOLE)); BukkitPlayerFunctions.sendMessage(plr, (C.NOT_CONSOLE));
return false; return false;

View File

@ -39,7 +39,7 @@ public class Rate extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 1) { if (args.length < 1) {
sendMessage(plr, C.RATING_NOT_VALID); sendMessage(plr, C.RATING_NOT_VALID);
return true; return true;

View File

@ -39,7 +39,7 @@ public class RegenAllRoads extends SubCommand {
} }
@Override @Override
public boolean execute(final Player player, final String... args) { public boolean execute(final PlotPlayer player, final String... args) {
if (player != null) { if (player != null) {
sendMessage(player, C.NOT_CONSOLE); sendMessage(player, C.NOT_CONSOLE);
return false; return false;

View File

@ -34,7 +34,7 @@ public class Reload extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
try { try {
// The following won't affect world generation, as that has to be // The following won't affect world generation, as that has to be
// loaded during startup unfortunately. // loaded during startup unfortunately.

View File

@ -55,7 +55,7 @@ public class Schematic extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 1) { if (args.length < 1) {
sendMessage(plr, C.SCHEMATIC_MISSING_ARG); sendMessage(plr, C.SCHEMATIC_MISSING_ARG);
return true; return true;

View File

@ -64,7 +64,7 @@ public class Set extends SubCommand {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (!BukkitPlayerFunctions.isInPlot(plr)) { if (!BukkitPlayerFunctions.isInPlot(plr)) {
BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT); BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT);
return false; return false;

View File

@ -51,7 +51,7 @@ public class SetOwner extends SubCommand {
} }
@Override @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); final Plot plot = BukkitPlayerFunctions.getCurrentPlot(plr);
if ((plot == null) || (plot.owner == null)) { if ((plot == null) || (plot.owner == null)) {
BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT); BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT);

View File

@ -84,7 +84,7 @@ public class Setup extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
// going through setup // going through setup
final String name = plr.getName(); final String name = plr.getName();
if (!setupMap.containsKey(name)) { if (!setupMap.containsKey(name)) {

View File

@ -44,7 +44,7 @@ public class Swap extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 1) { if (args.length < 1) {
BukkitPlayerFunctions.sendMessage(plr, C.NEED_PLOT_ID); BukkitPlayerFunctions.sendMessage(plr, C.NEED_PLOT_ID);
BukkitPlayerFunctions.sendMessage(plr, C.SWAP_SYNTAX); BukkitPlayerFunctions.sendMessage(plr, C.SWAP_SYNTAX);

View File

@ -41,7 +41,7 @@ public class TP extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 1) { if (args.length < 1) {
BukkitPlayerFunctions.sendMessage(plr, C.NEED_PLOT_ID); BukkitPlayerFunctions.sendMessage(plr, C.NEED_PLOT_ID);
return false; return false;

View File

@ -35,7 +35,7 @@ public class Target extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (!PlotSquared.isPlotWorld(plr.getWorld())) { if (!PlotSquared.isPlotWorld(plr.getWorld())) {
BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT_WORLD); BukkitPlayerFunctions.sendMessage(plr, C.NOT_IN_PLOT_WORLD);
return false; return false;

View File

@ -40,7 +40,7 @@ public class Template extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length != 2) { if (args.length != 2) {
BukkitPlayerFunctions.sendMessage(plr, C.COMMAND_SYNTAX, "/plot template <import|export> <world>"); BukkitPlayerFunctions.sendMessage(plr, C.COMMAND_SYNTAX, "/plot template <import|export> <world>");
return false; return false;

View File

@ -61,7 +61,7 @@ public class Trim extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (plr != null) { if (plr != null) {
BukkitPlayerFunctions.sendMessage(plr, (C.NOT_CONSOLE)); BukkitPlayerFunctions.sendMessage(plr, (C.NOT_CONSOLE));
return false; return false;

View File

@ -40,7 +40,7 @@ public class Trusted extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 2) { if (args.length < 2) {
BukkitPlayerFunctions.sendMessage(plr, C.TRUSTED_NEED_ARGUMENT); BukkitPlayerFunctions.sendMessage(plr, C.TRUSTED_NEED_ARGUMENT);
return true; return true;

View File

@ -17,7 +17,7 @@ public class Unban extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 1) { if (args.length < 1) {
return BukkitPlayerFunctions.sendMessage(plr, "&cUsage: &c" + this.usage); return BukkitPlayerFunctions.sendMessage(plr, "&cUsage: &c" + this.usage);
} }

View File

@ -40,7 +40,7 @@ public class Unclaim extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (!BukkitPlayerFunctions.isInPlot(plr)) { if (!BukkitPlayerFunctions.isInPlot(plr)) {
return !sendMessage(plr, C.NOT_IN_PLOT); return !sendMessage(plr, C.NOT_IN_PLOT);
} }

View File

@ -50,7 +50,7 @@ public class Unlink extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (!BukkitPlayerFunctions.isInPlot(plr)) { if (!BukkitPlayerFunctions.isInPlot(plr)) {
return sendMessage(plr, C.NOT_IN_PLOT); return sendMessage(plr, C.NOT_IN_PLOT);
} }
@ -69,7 +69,7 @@ public class Unlink extends SubCommand {
try { try {
MainUtil.update(plr.getLocation()); MainUtil.update(plr.getLocation());
} catch (final Exception e) { } catch (final Exception e) {
// execute(final Player plr, final String... args) { // execute(final PlotPlayer plr, final String... args) {
try { try {
PlotSquared.log("Error on: " + getClass().getMethod("execute", Player.class, String[].class).toGenericString() + ":119, when trying to use \"SetBlockFast#update\""); PlotSquared.log("Error on: " + getClass().getMethod("execute", Player.class, String[].class).toGenericString() + ":119, when trying to use \"SetBlockFast#update\"");
} catch (final Exception ex) { } catch (final Exception ex) {

View File

@ -47,7 +47,7 @@ public class Visit extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 1) { if (args.length < 1) {
return sendMessage(plr, C.NEED_USER); return sendMessage(plr, C.NEED_USER);
} }

View File

@ -24,6 +24,7 @@ import org.bukkit.entity.Player;
import com.intellectualcrafters.plot.BukkitMain; import com.intellectualcrafters.plot.BukkitMain;
import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.PlotSquared;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions; import com.intellectualcrafters.plot.util.bukkit.BukkitPlayerFunctions;
import com.intellectualcrafters.plot.util.bukkit.PWE; import com.intellectualcrafters.plot.util.bukkit.PWE;
@ -33,7 +34,7 @@ public class WE_Anywhere extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (PlotSquared.worldEdit == null) { if (PlotSquared.worldEdit == null) {
BukkitPlayerFunctions.sendMessage(plr, "&cWorldEdit is not enabled on this server"); BukkitPlayerFunctions.sendMessage(plr, "&cWorldEdit is not enabled on this server");
return false; return false;

View File

@ -56,7 +56,7 @@ public class list extends SubCommand {
} }
@Override @Override
public boolean execute(final Player plr, final String... args) { public boolean execute(final PlotPlayer plr, final String... args) {
if (args.length < 1) { if (args.length < 1) {
final StringBuilder builder = new StringBuilder(); final StringBuilder builder = new StringBuilder();
builder.append(C.SUBCOMMAND_SET_OPTIONS_HEADER.s()); builder.append(C.SUBCOMMAND_SET_OPTIONS_HEADER.s());

View File

@ -89,7 +89,7 @@ public class plugin extends SubCommand {
} }
@Override @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() { Bukkit.getScheduler().runTaskAsynchronously(PlotSquared.getMain(), new Runnable() {
@Override @Override
public void run() { public void run() {