From fe15bab05f0e8b87f4d89573da1a9fc1f101a121 Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Tue, 20 Sep 2011 12:33:42 +0100 Subject: [PATCH 1/2] Fixed bug preventing players from removing their own signs --- .../com/earth2me/essentials/signs/SignProtection.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignProtection.java b/Essentials/src/com/earth2me/essentials/signs/SignProtection.java index 1db607606..b9bbfb90f 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignProtection.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignProtection.java @@ -183,14 +183,19 @@ public class SignProtection extends EssentialsSign SignProtectionState retstate = SignProtectionState.NOSIGN; for (SignProtectionState state : signs.values()) { - if (state == SignProtectionState.OWNER || state == SignProtectionState.ALLOWED) + + if (state == SignProtectionState.OWNER) { return state; } - if (state == SignProtectionState.NOT_ALLOWED) + if (state == SignProtectionState.ALLOWED) { retstate = state; } + else if (state == SignProtectionState.NOT_ALLOWED && retstate != SignProtectionState.ALLOWED) + { + retstate = state + } } return retstate; } From 83e8dac6a04dee52d8be7e5d53eedff3b67f3238 Mon Sep 17 00:00:00 2001 From: snowleo Date: Tue, 20 Sep 2011 15:53:26 +0300 Subject: [PATCH 2/2] Add missing ; --- .../src/com/earth2me/essentials/signs/SignProtection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/signs/SignProtection.java b/Essentials/src/com/earth2me/essentials/signs/SignProtection.java index b9bbfb90f..81c95f8b8 100644 --- a/Essentials/src/com/earth2me/essentials/signs/SignProtection.java +++ b/Essentials/src/com/earth2me/essentials/signs/SignProtection.java @@ -194,7 +194,7 @@ public class SignProtection extends EssentialsSign } else if (state == SignProtectionState.NOT_ALLOWED && retstate != SignProtectionState.ALLOWED) { - retstate = state + retstate = state; } } return retstate;