summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect/src/com
diff options
context:
space:
mode:
authorIaccidentally <coryhuckaby@gmail.com>2012-10-28 13:05:08 -0400
committerIaccidentally <coryhuckaby@gmail.com>2012-10-28 13:05:08 -0400
commit72e0ab2cb2ef0d524d58f20664ed7064416bbc7b (patch)
tree21793b0e9c7207af6788f9e84218a26c3ed477e2 /EssentialsProtect/src/com
parente0d189a5e0a4bd953b3372212966d2bc826fe624 (diff)
downloadEssentials-72e0ab2cb2ef0d524d58f20664ed7064416bbc7b.tar
Essentials-72e0ab2cb2ef0d524d58f20664ed7064416bbc7b.tar.gz
Essentials-72e0ab2cb2ef0d524d58f20664ed7064416bbc7b.tar.lz
Essentials-72e0ab2cb2ef0d524d58f20664ed7064416bbc7b.tar.xz
Essentials-72e0ab2cb2ef0d524d58f20664ed7064416bbc7b.zip
NOW with complete wither protection!
Diffstat (limited to 'EssentialsProtect/src/com')
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java7
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java1
2 files changed, 7 insertions, 1 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
index 30a516667..a0d1a48f9 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
@@ -225,7 +225,7 @@ public class EssentialsProtectEntityListener implements Listener
return;
}
if (event.getEntity() instanceof Wither
- && prot.getSettingBool(ProtectConfig.prevent_witherskull_spawnexplosion))
+ && prot.getSettingBool(ProtectConfig.prevent_wither_spawnexplosion))
{
event.setCancelled(true);
return;
@@ -353,5 +353,10 @@ public class EssentialsProtectEntityListener implements Listener
event.setCancelled(true);
return;
}
+ if (event.getEntityType() == EntityType.WITHER && prot.getSettingBool(ProtectConfig.prevent_wither_blockreplace))
+ {
+ event.setCancelled(true);
+ return;
+ }
}
}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java b/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java
index 0ef389147..9a24cad23 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/ProtectConfig.java
@@ -38,6 +38,7 @@ public enum ProtectConfig
prevent_witherskull_explosion("protect.prevent.witherskull-explosion", false),
prevent_witherskull_playerdmg("protect.prevent.witherskull-playerdamage", false),
prevent_wither_spawnexplosion("protect.prevent.wither-spawnexplosion", false),
+ prevent_wither_blockreplace("protect.prevent.wither-blcokreplace", false),
prevent_creeper_explosion("protect.prevent.creeper-explosion", true),
prevent_creeper_playerdmg("protect.prevent.creeper-playerdamage", false),
prevent_creeper_blockdmg("protect.prevent.creeper-blockdamage", false),