summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect
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
commit06cfbab6ae5501de16803815f89fa5029c09477f (patch)
tree0cfde0d781f6ccd4bf14a8b2e060fc0c8c6b82ea /EssentialsProtect
parente9fb819d0ae25a26c07d9927274cde11604dbd7d (diff)
downloadEssentials-06cfbab6ae5501de16803815f89fa5029c09477f.tar
Essentials-06cfbab6ae5501de16803815f89fa5029c09477f.tar.gz
Essentials-06cfbab6ae5501de16803815f89fa5029c09477f.tar.lz
Essentials-06cfbab6ae5501de16803815f89fa5029c09477f.tar.xz
Essentials-06cfbab6ae5501de16803815f89fa5029c09477f.zip
NOW with complete wither protection!
Diffstat (limited to 'EssentialsProtect')
-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),