NOW with complete wither protection!

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

View File

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

View File

@ -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;
}
}
}

View File

@ -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),