From 635a4bd7a482c607d7d058c461f60579b2de24e0 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Thu, 9 Apr 2015 22:21:25 +1000 Subject: [PATCH] Fixes #250 --- PlotSquared/pom.xml | 2 +- .../plot/commands/Kick.java | 2 +- .../plot/listeners/PlayerEvents.java | 22 +++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/PlotSquared/pom.xml b/PlotSquared/pom.xml index abb846454..f996a821e 100644 --- a/PlotSquared/pom.xml +++ b/PlotSquared/pom.xml @@ -8,7 +8,7 @@ UTF-8 PlotSquared - 2.9.8 + 2.9.9 PlotSquared jar 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 8dfd92916..73bed1336 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Kick.java @@ -57,7 +57,7 @@ public class Kick extends SubCommand { } Location otherLoc = player.getLocation(); if (!plr.getLocation().getWorld().equals(otherLoc.getWorld()) || !plot.equals(MainUtil.getPlot(otherLoc))) { - MainUtil.sendMessage(plr, C.INVALID_PLAYER.s().replaceAll("%player%", args[0])); + MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]); return false; } player.teleport(BlockManager.manager.getSpawn(loc.getWorld())); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java index da9238f94..0dba51427 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -169,20 +169,20 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi if (!isPlotWorld(loc.getWorld())) { return; } - Plot plot = MainUtil.getPlot(loc); - if (plot == null) { - return; - } - Flag redstone = FlagManager.getPlotFlag(plot, "redstone"); - if (redstone == null || (Boolean) redstone.getValue()) { - return; - } - if (!isPlotArea(loc)) { - return; - } switch (block.getType()) { case REDSTONE_COMPARATOR_OFF: case REDSTONE_COMPARATOR_ON: { + Plot plot = MainUtil.getPlot(loc); + if (plot == null) { + return; + } + Flag redstone = FlagManager.getPlotFlag(plot, "redstone"); + if (redstone == null || (Boolean) redstone.getValue()) { + return; + } + if (!isPlotArea(loc)) { + return; + } event.setCancelled(true); } }