WorldGuard

WorldGuard

8M Downloads

Allow fire despawning flag

LadyCailinBot opened this issue ยท 13 comments

commented

WORLDGUARD-2657 - Reported by TheOnlyRealTGS

So if you protect a region with fire in it wont despawn.
This is usefull, but if you have a mobarena with blazes in it, it really annoying. (Right now every block is like netherrack xD)
So it would be great with a flag that would allow fire to despawn.
Etc: allow-fire-despawn: true/false
I hope you will consider this in a future update

commented

Comment by wizjany

despawn? what?

commented

Comment by TheOnlyRealTGS

So it disappears after some seconds / burn out

commented

Comment by wizjany

yes, that happens normally

commented

Comment by TheOnlyRealTGS

Yea that happens normally, but not if the region is protected.
Firespread is denyed btw

commented

Comment by wizjany

WG doesn't prevent fire from burning out...

commented

Comment by TheOnlyRealTGS

It does. In my region when a blaze shoots out a fireball and it hits a block, the fire wont burn out.
You can see it with your own eyes if you want on my server. I don't have any other 3rd part plugins like WG.

commented

Comment by wizjany

    // CraftBukkit start
    private void fireExtinguished(World world, int x, int y, int z) {
        if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world.getWorld().getBlockAt(x, y, z), 0).isCancelled() == false) {
            world.setAir(x, y, z);
        }
    }
    // CraftBukkit end```

@eventhandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onBlockFade(BlockFadeEvent event) {

    ConfigurationManager cfg = plugin.getGlobalStateManager();
    WorldConfiguration wcfg = cfg.get(event.getBlock().getWorld());

    int type = event.getBlock().getTypeId();

    if (type == BlockID.ICE) {
        if (wcfg.disableIceMelting) {
            event.setCancelled(true);
            return;
        }
        if (wcfg.useRegions && !plugin.getGlobalRegionManager().allows(
                DefaultFlag.ICE_MELT, event.getBlock().getLocation())) {
            event.setCancelled(true);
            return;
        }
    }

    if (type == BlockID.SNOW) {
        if (wcfg.disableSnowMelting) {
            event.setCancelled(true);
            return;
        }
        if (wcfg.useRegions && !plugin.getGlobalRegionManager().allows(
                DefaultFlag.SNOW_MELT, event.getBlock().getLocation())) {
            event.setCancelled(true);
            return;
        }
    }
}```

No it doesn't.

commented

Comment by TheOnlyRealTGS

Brb ill test in on a fresh server

commented

Comment by TheOnlyRealTGS

Okay i tested it on a fresh server with only WE WG and it still happens. Come and see with your own eyes:
2.106.167.91:25567

commented

Comment by TheOnlyRealTGS

Hmm it seems like this is only caused by blazes

commented

Comment by TheOnlyRealTGS

I recorded a short video of it: http://www.youtube.com/watch?v=sr20oJrtohg
Only worldedit and world guard installed

commented

Comment by wizjany

also using just WE/WG, still can't reproduce

commented

Comment by TheOnlyRealTGS

It only happens on leaves with fire from blazes.
It seems to disappear on vines from time to time though.