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.
This commit is contained in:
David Precious 2017-03-17 16:37:58 +00:00 committed by RoboMWM
parent 3837794c56
commit 73fcd9a674
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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());
}