From e2609b8973badc2beb92d97c56a43b05ec88ed2e Mon Sep 17 00:00:00 2001 From: zhro Date: Tue, 4 Apr 2017 16:26:49 -0400 Subject: [PATCH] Don't warn players about unclaimed land if they do not have the 'griefprevention.createclaims' permission. (#112) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an optional extended description… --- src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java b/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java index cfd800c..fbcc401 100644 --- a/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java +++ b/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java @@ -336,8 +336,9 @@ public class BlockEventHandler implements Listener else if(!this.trashBlocks.contains(block.getType()) && GriefPrevention.instance.claimsEnabledForWorld(block.getWorld())) { if(!playerData.warnedAboutBuildingOutsideClaims && !player.hasPermission("griefprevention.adminclaims") - && ((playerData.lastClaim == null && playerData.getClaims().size() == 0) - || (playerData.lastClaim != null && playerData.lastClaim.isNear(player.getLocation(), 15)))) + && player.hasPermission("griefprevention.createclaims") && ((playerData.lastClaim == null + && playerData.getClaims().size() == 0) || (playerData.lastClaim != null + && playerData.lastClaim.isNear(player.getLocation(), 15)))) { Long now = null; if(playerData.buildWarningTimestamp == null || (now = System.currentTimeMillis()) - playerData.buildWarningTimestamp > 600000) //10 minute cooldown