From 7522184a3420af22a01ec4af6770bbb5e5e7d50b Mon Sep 17 00:00:00 2001 From: boy0001 Date: Mon, 29 Dec 2014 00:57:09 +1100 Subject: [PATCH] safety --- .../com/intellectualcrafters/plot/commands/Purge.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 76fe5e6f8..770dbff2f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Purge.java @@ -36,6 +36,10 @@ import org.bukkit.entity.Player; @Override public boolean execute(final Player plr, final String... args) { + if (plr != null) { + PlayerFunctions.sendMessage(plr, (C.NOT_CONSOLE)); + return false; + } if (args.length != 2) { if (args.length == 1) { try { @@ -43,11 +47,6 @@ import org.bukkit.entity.Player; final String world = split[0]; final PlotId id = new PlotId(Integer.parseInt(split[1]), Integer.parseInt(split[2])); - if (plr != null) { - PlayerFunctions.sendMessage(plr, (C.NOT_CONSOLE)); - return false; - } - if (!PlotMain.isPlotWorld(world)) { PlayerFunctions.sendMessage(null, C.NOT_VALID_PLOT_WORLD); return false;