1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-12 09:35:26 +02:00

NOW with complete wither protection!

This commit is contained in:
Iaccidentally
2012-10-28 13:05:08 -04:00
parent e42b00f0df
commit 01f148cb5e
3 changed files with 8 additions and 1 deletions

View File

@@ -463,6 +463,7 @@ protect:
witherskull-explosion: flase witherskull-explosion: flase
witherskull-playerdamage: false witherskull-playerdamage: false
wither-spawnexplosion: flase wither-spawnexplosion: flase
wither-blockreplace: false
creeper-explosion: false creeper-explosion: false
creeper-playerdamage: false creeper-playerdamage: false
creeper-blockdamage: false creeper-blockdamage: false

View File

@@ -225,7 +225,7 @@ public class EssentialsProtectEntityListener implements Listener
return; return;
} }
if (event.getEntity() instanceof Wither if (event.getEntity() instanceof Wither
&& prot.getSettingBool(ProtectConfig.prevent_witherskull_spawnexplosion)) && prot.getSettingBool(ProtectConfig.prevent_wither_spawnexplosion))
{ {
event.setCancelled(true); event.setCancelled(true);
return; return;
@@ -353,5 +353,10 @@ public class EssentialsProtectEntityListener implements Listener
event.setCancelled(true); event.setCancelled(true);
return; return;
} }
if (event.getEntityType() == EntityType.WITHER && prot.getSettingBool(ProtectConfig.prevent_wither_blockreplace))
{
event.setCancelled(true);
return;
}
} }
} }

View File

@@ -38,6 +38,7 @@ public enum ProtectConfig
prevent_witherskull_explosion("protect.prevent.witherskull-explosion", false), prevent_witherskull_explosion("protect.prevent.witherskull-explosion", false),
prevent_witherskull_playerdmg("protect.prevent.witherskull-playerdamage", false), prevent_witherskull_playerdmg("protect.prevent.witherskull-playerdamage", false),
prevent_wither_spawnexplosion("protect.prevent.wither-spawnexplosion", 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_explosion("protect.prevent.creeper-explosion", true),
prevent_creeper_playerdmg("protect.prevent.creeper-playerdamage", false), prevent_creeper_playerdmg("protect.prevent.creeper-playerdamage", false),
prevent_creeper_blockdmg("protect.prevent.creeper-blockdamage", false), prevent_creeper_blockdmg("protect.prevent.creeper-blockdamage", false),