mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
NOW with complete wither protection!
This commit is contained in:
parent
e0d189a5e0
commit
72e0ab2cb2
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user