From d777b42a480c161e891d2f5a36c2a395444da5a2 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Thu, 18 Dec 2014 18:45:26 +1100 Subject: [PATCH] wall sign issue --- .../java/com/intellectualcrafters/plot/commands/Unclaim.java | 5 +++-- .../java/com/intellectualcrafters/plot/util/PlotHelper.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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 b64cf0fac..941c3312a 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Unclaim.java @@ -52,7 +52,7 @@ public class Unclaim extends SubCommand { } assert plot != null; final PlotWorld pWorld = PlotMain.getWorldSettings(plot.getWorld()); - if (PlotMain.useEconomy && pWorld.USE_ECONOMY) { + if (PlotMain.useEconomy && pWorld.USE_ECONOMY && (plot != null) && plot.hasOwner() && plot.getOwner().equals(plr.getUniqueId())) { final double c = pWorld.SELL_PRICE; if (c > 0d) { final Economy economy = PlotMain.economy; @@ -68,8 +68,9 @@ public class Unclaim extends SubCommand { } } else { - PlayerFunctions.sendMessage(plr, "Plot removal has been denied."); + PlayerFunctions.sendMessage(plr, "Plot unclaim has been denied."); } + PlayerFunctions.sendMessage(plr, C.); return true; } } diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlotHelper.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlotHelper.java index b05d5fb4b..4f05f111f 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlotHelper.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/util/PlotHelper.java @@ -259,7 +259,7 @@ public class PlotHelper { final PlotWorld plotworld = PlotMain.getWorldSettings(world); final Location loc = manager.getSignLoc(world, plotworld, p); final Block bs = loc.getBlock(); - if (bs.getType() != Material.WALL_SIGN) { + if (bs.getType() == Material.WALL_SIGN) { bs.setType(Material.AIR); } }