From 73fcd9a674854783986444f5fbc22c4eb7069f9f Mon Sep 17 00:00:00 2001 From: David Precious Date: Fri, 17 Mar 2017 16:37:58 +0000 Subject: [PATCH] add new permission to show claim dimensions Show the claim size to those with griefprevention.seeclaimsize when right-clicking with the investigation tool (stick by default) - it's not exactly private information, the claim boundaries are visualised so it would be easy to just count the blocks or compare the coords of the corners to find out. --- plugin.yml | 4 ++++ src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugin.yml b/plugin.yml index 08d6a42..9f581cd 100644 --- a/plugin.yml +++ b/plugin.yml @@ -247,6 +247,7 @@ permissions: griefprevention.deleteclaimsinworld: true griefprevention.siegeteleport: true griefprevention.unlockothersdrops: true + griefprevention.seeclaimsize: true griefprevention.siegeimmune: description: Makes a player immune to /Siege. default: op @@ -322,6 +323,9 @@ permissions: griefprevention.visualizenearbyclaims: description: Allows a player to see all nearby claims at once. default: op + griefprevention.seeclaimsize: + description: Allows a player to see claim size for other players claims when right clicking with investigation tool + default: op griefprevention.gpblockinfo: description: Grants access to /GPBlockInfo. default: op diff --git a/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java b/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java index 5eb354b..2c29116 100644 --- a/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java +++ b/src/me/ryanhamshire/GriefPrevention/PlayerEventHandler.java @@ -1891,9 +1891,7 @@ class PlayerEventHandler implements Listener Visualization.Apply(player, visualization); - //if can resize this claim, tell about the boundaries - if(claim.allowEdit(player) == null) - { + if (player.hasPermission("griefprevention.seeclaimsize")) { instance.sendMessage(player, TextMode.Info, " " + claim.getWidth() + "x" + claim.getHeight() + "=" + claim.getArea()); }