diff options
author | snowleo <schneeleo@gmail.com> | 2011-09-20 05:44:50 -0700 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-09-20 05:44:50 -0700 |
commit | 3879d582d3c6027be34dd632c8daa0ebf16566af (patch) | |
tree | 806c8edc4722f33c6625f7efd3d3a90e94ac6bad | |
parent | 1fd5222d40bad99a7f66a44c0b85b761100e2029 (diff) | |
parent | fe15bab05f0e8b87f4d89573da1a9fc1f101a121 (diff) | |
download | Essentials-3879d582d3c6027be34dd632c8daa0ebf16566af.tar Essentials-3879d582d3c6027be34dd632c8daa0ebf16566af.tar.gz Essentials-3879d582d3c6027be34dd632c8daa0ebf16566af.tar.lz Essentials-3879d582d3c6027be34dd632c8daa0ebf16566af.tar.xz Essentials-3879d582d3c6027be34dd632c8daa0ebf16566af.zip |
Merge pull request #24 from eXeC64/master
Fixed bug where players are unable to remove their own chest protection.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/signs/SignProtection.java | 9 |
1 files 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; } |