diff options
author | Iaccidentally <coryhuckaby@gmail.com> | 2012-10-28 10:53:26 -0400 |
---|---|---|
committer | Iaccidentally <coryhuckaby@gmail.com> | 2012-10-28 10:53:26 -0400 |
commit | 6be807e30d356fde3e1b579bfa99a0993c4b3a70 (patch) | |
tree | 4b1d1de756c62fabde22508232eebf87e7e3dc97 /EssentialsProtect | |
parent | a12706f88daf3e309797b4ed3e099df5ec9d7207 (diff) | |
download | Essentials-6be807e30d356fde3e1b579bfa99a0993c4b3a70.tar Essentials-6be807e30d356fde3e1b579bfa99a0993c4b3a70.tar.gz Essentials-6be807e30d356fde3e1b579bfa99a0993c4b3a70.tar.lz Essentials-6be807e30d356fde3e1b579bfa99a0993c4b3a70.tar.xz Essentials-6be807e30d356fde3e1b579bfa99a0993c4b3a70.zip |
1.4 update :: protect updates :: update config.yml
Diffstat (limited to 'EssentialsProtect')
-rw-r--r-- | EssentialsProtect/src/net/ess3/protect/EssentialsProtectEntityListener.java | 7 | ||||
-rw-r--r-- | EssentialsProtect/src/net/ess3/protect/Permissions.java | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/EssentialsProtect/src/net/ess3/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/net/ess3/protect/EssentialsProtectEntityListener.java index 7b3b8dc9d..5adb2b4a3 100644 --- a/EssentialsProtect/src/net/ess3/protect/EssentialsProtectEntityListener.java +++ b/EssentialsProtect/src/net/ess3/protect/EssentialsProtectEntityListener.java @@ -149,6 +149,13 @@ public class EssentialsProtectEntityListener implements Listener { event.setCancelled(true); } + if (cause == DamageCause.WITHER + && (Permissions.PREVENTDAMAGE_WITHER.isAuthorized(user)) + && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user)) + { + event.setCancelled(true); + return; + } } } diff --git a/EssentialsProtect/src/net/ess3/protect/Permissions.java b/EssentialsProtect/src/net/ess3/protect/Permissions.java index 6226fdf7f..9574ca886 100644 --- a/EssentialsProtect/src/net/ess3/protect/Permissions.java +++ b/EssentialsProtect/src/net/ess3/protect/Permissions.java @@ -22,6 +22,7 @@ public enum Permissions implements IPermission PREVENTDAMAGE_FIRE(PermissionDefault.FALSE), PREVENTDAMAGE_DROWNING(PermissionDefault.FALSE), PREVENTDAMAGE_LIGHTNING(PermissionDefault.FALSE), + PREVENTDAMAGE_WITHER(PermissionDefault.FALSE), PREVENTDAMAGE_NONE(PermissionDefault.FALSE), USEFLINTSTEEL(PermissionDefault.TRUE); private static final String base = "essentials.protect."; |