mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-27 21:15:57 +01:00
Wither skulls should be handled separately from fireballs
This commit is contained in:
parent
3e06000fd9
commit
4398c781c5
@ -41,6 +41,8 @@
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.entity.Tameable;
|
||||
import org.bukkit.entity.ThrownPotion;
|
||||
import org.bukkit.entity.Wither;
|
||||
import org.bukkit.entity.WitherSkull;
|
||||
import org.bukkit.entity.Wolf;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@ -533,7 +535,7 @@ public void onEntityExplode(EntityExplodeEvent event) {
|
||||
|
||||
// Not all explosions come from an entity
|
||||
if (ent != null) {
|
||||
if (ent.getType() == witherType) {
|
||||
if (ent instanceof Wither) {
|
||||
if (wcfg.blockWitherBlockDamage) {
|
||||
event.blockList().clear();
|
||||
event.setCancelled(true);
|
||||
@ -546,7 +548,7 @@ public void onEntityExplode(EntityExplodeEvent event) {
|
||||
}
|
||||
}
|
||||
|
||||
if (ent.getType() == witherSkullType) {
|
||||
if (ent instanceof WitherSkull) {
|
||||
if (wcfg.blockWitherSkullBlockDamage) {
|
||||
event.blockList().clear();
|
||||
event.setCancelled(true);
|
||||
@ -625,7 +627,7 @@ public void onEntityExplode(EntityExplodeEvent event) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (ent instanceof Fireball) {
|
||||
} else if (ent instanceof Fireball && !(ent instanceof WitherSkull)) {
|
||||
if (wcfg.blockFireballBlockDamage) {
|
||||
event.blockList().clear();
|
||||
event.setCancelled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user