diff --git a/src/main/java/com/sk89q/worldguard/bukkit/WorldConfiguration.java b/src/main/java/com/sk89q/worldguard/bukkit/WorldConfiguration.java index 213b7827..6b9c35a3 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/WorldConfiguration.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/WorldConfiguration.java @@ -96,6 +96,7 @@ public class WorldConfiguration { public Set allowedLavaSpreadOver; public boolean blockCreeperExplosions; public boolean blockCreeperBlockDamage; + public boolean blockFireballBlockDamage; public int loginProtection; public int spawnProtection; public boolean kickOnDeath; @@ -275,6 +276,7 @@ private void loadConfiguration() { blockCreeperExplosions = getBoolean("mobs.block-creeper-explosions", false); blockCreeperBlockDamage = getBoolean("mobs.block-creeper-block-damage", false); + blockFireballBlockDamage = getBoolean("mobs.block-fireball-block-damage", false); antiWolfDumbness = getBoolean("mobs.anti-wolf-dumbness", false); loginProtection = getInt("spawn.login-protection", 3); diff --git a/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardEntityListener.java b/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardEntityListener.java index 7d116a72..df5552de 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardEntityListener.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardEntityListener.java @@ -484,6 +484,11 @@ public void onEntityExplode(EntityExplodeEvent event) { } } } else if (ent instanceof Fireball) { + if (wcfg.blockFireballBlockDamage) { + event.setCancelled(true); + return; + } + if (wcfg.useRegions) { Vector pt = toVector(l); RegionManager mgr = plugin.getGlobalRegionManager().get(world);