mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 10:37:41 +01:00
Added config option to block fireball world damage only. Thanks Qalthos
This commit is contained in:
parent
cfffba25cf
commit
1e24e9c128
@ -96,6 +96,7 @@ public class WorldConfiguration {
|
||||
public Set<Integer> 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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user