From ad94637c2a514131f8adaa6aff8c1ae5c003a12d Mon Sep 17 00:00:00 2001 From: boy0001 Date: Fri, 28 Aug 2015 09:53:35 +1000 Subject: [PATCH] Fix inbox deletion perm --- .../java/com/intellectualcrafters/plot/commands/Inbox.java | 1 + .../com/intellectualcrafters/plot/util/ClusterManager.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java b/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java index dc2775c70..6017b43d7 100644 --- a/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java +++ b/src/main/java/com/intellectualcrafters/plot/commands/Inbox.java @@ -136,6 +136,7 @@ public class Inbox extends SubCommand { case "delete": { if (!inbox.canModify(plot, player)) { sendMessage(player, C.NO_PERM_INBOX_MODIFY); + return false; } if (args.length != 3) { sendMessage(player, C.COMMAND_SYNTAX, "/plot inbox " + inbox.toString() + " delete "); diff --git a/src/main/java/com/intellectualcrafters/plot/util/ClusterManager.java b/src/main/java/com/intellectualcrafters/plot/util/ClusterManager.java index 23ca04120..13ff0af0a 100644 --- a/src/main/java/com/intellectualcrafters/plot/util/ClusterManager.java +++ b/src/main/java/com/intellectualcrafters/plot/util/ClusterManager.java @@ -216,6 +216,10 @@ public class ClusterManager { } public static PlotId estimatePlotId(final Location loc) { + Plot plot = MainUtil.getPlot(loc); + if (plot != null) { + return plot.id; + } final PlotId a = new PlotId(0, 0); final PlotId b = new PlotId(1, 1); int xw;