From 1b650a59b25dfa709018e33787a10c6350ae770c Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Tue, 9 Jun 2015 21:10:47 -0700 Subject: [PATCH] Fixed: Claim managers can /untrust. They shouldn't be able to do this. Only an owner can /untrust, since /untrust also revokes manager-level permissions. --- src/me/ryanhamshire/GriefPrevention/GriefPrevention.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java index 513d231..6d8d0a3 100644 --- a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java +++ b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java @@ -1259,10 +1259,10 @@ public class GriefPrevention extends JavaPlugin { idToDrop = otherPlayer.getUniqueId().toString(); } - claim.dropPermission(idToDrop); - if(claim.allowEdit(player) == null) + if(claim.allowEdit(player) == null) { - claim.managers.remove(idToDrop); + claim.dropPermission(idToDrop); + claim.managers.remove(idToDrop); //beautify for output if(args[0].equals("public")) @@ -1274,7 +1274,8 @@ public class GriefPrevention extends JavaPlugin } else { - GriefPrevention.sendMessage(player, TextMode.Success, Messages.UntrustOwnerOnly, claim.getOwnerName()); + GriefPrevention.sendMessage(player, TextMode.Err, Messages.UntrustOwnerOnly, claim.getOwnerName()); + return true; } }