AntiFire
Is fire damaging your precious buildings or forests? Want to allow fire but restrict its mechanics? Or just log it? Or tp there and put it out? This plugin, inspired by @happypumkin and @x0pk1n, allows all that and more with detailed configurability. To be specific, it has the following features, all configurable by world:
- disable fire spreading, by world
- fire start controls:
- log fire starting with detailed world location (players only, or also lightning and lava)
- disable fire starting by lightning, fire spread, explosions, fireballs, explosions, ender crystals, and/or lava
- disable starting fire to blocks by players (with enable by Permissions)
- disable starting fire to mobs & players by players (with enable by Permissions)
- make certain block types fireproof! Configurable list of block IDs.
- fire duration controls:
- by the mechanism that started the fire, regardless of the underlying material
- disable fire damage to blocks, players, and/or non-player entries including mobs
- disable lava damage to blocks, players, and/or non-player entries
- disable lava placement by players, with permissions override support
- commands to view last few locations of fire starting, by whom
- commands to teleport to a log entry
- command to put out fires nearby you, or in entire world
- commands to view/set/save all config values, or reload from config.yml
- command to flush fire start log to disk
- option to make burnt logs drop charcoal.
- supports multiple languages [in 2.6]
- control fire duration by start type, providing fixed value or a range [in 2.7]
Configuration
Most of the controls of this plugin, like AntiCreeper, are solely by configuration flags. Almost all entries are lists of worlds in which that specific behavior will be active. You can either present them as a YML list of strings:
nospread: - world - world_the_end
But I found that to get hard to read when I have so many config items, so you can optionally present them on one line as a comma-separated list:
nospread: world, world_the_end
Blocklist
The .blocklist entry is the same as you'll find in AntiCreeper's blocklists. It's a list of comma-separated block names, and allows sub-type listings in form of "#:#"[3.0] which could be used, for example, to make jungle wood fireproof but allow burning other wood. If you wish to make almost everything fireproof except a few blocks, set .whitelist to true and then only list the ones that should burn. There are few rare cases where the block detection may not seem to work well, but this only happens if there is another burnable block adjacent to the fire location.
Configurable Fields
Description of configurable items. Most are lists of worlds per above.
nerf_fire.logstart:
- .player: if set for a world, logs player, date/time, and location to server.log
- .lava: if set for a world, logs event, date/time, and location to server.log
- .lightning: if set for a world, logs event, date/time, and location to server.log
- .fireball: if set for a world, logs event, date/time, and location to server.log
- .explosion: if set for a world, logs event, date/time, and location to server.log
- .crystal: if set for a world, logs event, date/time, and location to server.log
nerf_fire.whitelist: if false, blocks on blocklist are fireproof; if true, fire can only be started on blocks on blocklist
nerf_fire.blocklist: list of decimal block ids per above
nerf_fire.nospread: if set for a world, fire cannot spread from one block to another there.
nerf_fire.wooddropscharcoal: if set for a world, burnt logs drop 0-3 charcoal
nerf_fire.charcoaldrop: new node that modifies behavior when above is set for any world
- .max integer that sets maximum number of charcoal dropped
- .random [true|false] that sets if fixed to max or random from 1-max
- speciesmax node to set max drops by species of wood
- support for 1.7 types Acacia and Dark Oak
- Each entry underneath should be <some>_LOG: #
- See example in default below.
- anydropchance 0-100 integer to set chance of any kind of drop, whether random or fixed at max
- see table below for default chances, averages
anydropchance | max | random average | fixed (max) avg |
75% | 1 | 0.75 | 0.75 |
75% | 2 | 1.125 | 1.5 |
75% | 3 | 1.5 | 2.25 |
75% | 4 | 1.875 | 3 |
75% | 5 | 2.25 | 3.75 |
75% | 6 | 2.625 | 4.5 |
- [Deleted in 3.0]
.treetypemax list for setting max drops by type of woodset in this order: Oak, Spruce, Birch, Junglemust set all four or else defaults to charcoaldrop.max.
nerf_fire.nostartby: node with below items
- .op: if true, even Op cannot start a fire (without Permission set)
- .lightning: if set for a world, lightning not supposed to start a fire
- .fireball: if set for a world, fireballs from dispensers or other plugins not supposed to start a fire
- .lava: if set for a world, lava cannot start fire on adjacent block
- .player: if set for a world, NO players can start a fire in that world unless (a) they are Op or (b) have permission antifire.startfire set. Caution: Also means nerfed players can NOT enable a portal.
- .explosion: if set for a world, all explosions in that world do not start a fire. Overrides other plugins, like AntiCreeper
- .crystal: if set for a world, ender crystals do not start fires.
nerf_fire.nodamageto: node with below items
- .block: burning blocks will not be destroyed in listed worlds
- .player.fromlava: lava will not hurt players (2 hearts per tick) in listed worlds, but remember it also sets people on fire Refer to example config Walk on Lava
- .player.fromfire: players will not catch fire or incur fire damage in listed worlds
- nonplayer has now been replaced by the following:
- .hostilemob.fromfire: hostile mobs won't catch on fire in listed worlds
- .peacefulmob.fromfire:
- .mob.fromfire: applies to bats and when above not set
- .painting.fromfire: paintings won't catch fire in listed worlds
- .drops.fromfire: dropped items
- .item.fromfire: anything not in previous categories
- all of above items with fromlava work as well
nerf_fire.noburnmobby: node with below items
- .player: players cannot light mobs with flaming weapons or arrows in supplied worlds,
- unless they have permission antifire.burnmob
- .mob: mobs cannot do the same, if they were to have such
- .op: if true, OPs can NOT set mobs alight
- unless they have permission antifire.burnmob
nerf_fire.noburnplayerby: similar to above, but against players
- corresponding permission is antifire.burnplayer
nerf_fire.noplacelavaby: node controlling lava placement
- .player: if set for a world, NO players can place lava in that world unless (a) they are Op or (b) have permission antifire.placelava set
- .op: if true, even Op cannot place lava (without Permission set)
nerf_fire.timedcauses : node offering fixed or random fire durations. See its detailed description page.
nerf_fire.timeNetherackToo: if set for a world, even infinitely burning blocks like netherack will be subject to timedcauses.
nerf_fire.rainOverridesTimed: if set for a world, rain will put out blocks even if they are subject to timedcauses. [Added in 2.8]
nerf_fire.logplace.lava: node that adds lava placement to the Antifire log for listed worlds.
nerf_fire.logflushsecs: age in seconds of fire start log entries to flush to disk. This only happens when a new entry is added (in order to avoid overhead of a periodic tic) and if the current list of entries is more than ten (all that can fit in chat display).
Default Configuration
Most of the mechanics of this plugin are disabled by default, except logging fire start locations to your server log file. and now fire spreading is Off by default. But only if your server has a world named "world".
nerf_fire: logstart: player: world lightning: world whitelist: false nospread: world nostartby: op: false logflushsecs: 600 woodropscharcoal: world charcoaldrop: random: true anydropchance: 75
max: 4 noplacelavaby: op: false nodamageto: peacefulmob: fromlava: world fromfire: world drops: fromfire: world logplace: lava: world rainOverridesTimed: false
Example Configurations (click here)
Examples of timedcauses config is only found found here. It is not in the default config.
Permissions & Commands
Has been moved to another page here. That page has some example commands
Statistics
Since 1.4 the plugin now sends statistics to mcstats.org. These are completely anonymous and help me as a plugin developer know how the plugin is being used. You can view the same data by clicking below. If you want to turn it off, simply edit plugins/PluginMetrics/config.yml and change opt-out: false to true
Languages and Translations
AntiFire now supports you configuring your own strings used to players, and setting alternate languages as well. This is done with LanguageAPI plugin. See the detailed language page for more.
Possible features:
- Suppressing hissing sound when drops are not damaged by lava
- Allow different timedcause configuration per world
Change timeNetherackToo to a world-based config flag. [2.9]
Add an option for rain to still put out timed fires [2.8]
LanguageAPI support for translations
Configurable in-game messaging
Just posted version 2.0. It requires Bukkit development 1.6.4 build 2894 or later. It adds new fire duration control.
@filbert66
Thanks you.
@PlayerToo
That is not currently a feature. I could add it, if there is demand.
What you can do is disable fire start by lava, and fire damage by lava to different entities. See Configurable Fields above.
How can you enable lava placement by players. I couldn't find it in the config.yml.
New update 1.7.1 just posted, to address this error on startup:
Same as reported on my other plugin, AntiCreeper.
@nb123123
Those are to comment them out. Delete the # and supply a value if you want that node to take effect.
Are most of the configuration nodes supposed to start with #?
thx my bro made a deadly explosion radius 25 ghast and blew everything up. this helped lol
@DarkFool
Thanks again, DarkFool. Fixed that typo and added global max.
@filbert66
Likewise, thanks for being so open to feedback and suggestions! Sorry for taking so long to reply, real life happened. XD
That said, I don't think the example config is quite right. :3 As-is, it throws an error "org.bukkit.configuration.InvalidConfigurationException: mapping values are not allowed here in "<string>", line 7, column 18:"
Whereas, if you remove the two spaces prior to treetypemax: (thus giving it 4 leading spaces instead), it works properly.
Just a head's up!
@DarkFool
Your feature is now posted in version 1.7, due to be approved very soon. Added ability to vary the drops by the tree type (oak, redwood, birch, jungle). Example config for that is here.
Thanks for all the feedback & suggestions, DarkFool!
@DarkFool
Sure, that would be no problem. It was actually complex to drop 0-3 and would be a lot easier to drop a fixed amount. I'm thinking of a new config node like this:
This feels way too simple for a suggestion ticket, so. :3
Could a config option be added for the amount of charcoal dropped by burning logs? Some servers might like the gambling feel of 0-3... but I'd kind of like a guaranteed 1, myself, to mimic smelting.
(Excellent idea for the charcoal dropping, by the way -- it's such a simple thing that Minecraft probably should already have, that most people would overlook thinking of normally!)
@MedlarGW
Unable to light the fire. In game, they briefly see fire and then it disappears.
There is the chance that they can light something else adjacent to the log. As noted in Caveats: Player can still point at adjacent burnable block, but the fireproof block won't burn up when the burnable block's fire goes out.
If I disabled the ability for logs to catch fire for example, could someone still light them and potentially have an eternally burning log? Or would they be unable to light the fire initially?
Just posted new 1.6 version which implements a lot of new stuff, most based on 1.5.1 improvements. Haven't implemented in-game commands for the new stuff, but it's been too long since a version was posted and wanted to get this out. Commands are coming.
Yes, 1.6 requires 1.5.1 or more.
@BornToWemble
If you don't give me more data, I can't help you. Again, suggest using in-game commands to get the settings you want, then do "af save".
@BornToWemble
I don't know what is going on, I put that in and it still didn't change anything, and I was trying to get those settings for the world into the Nether. I'm at my wits end as to why this won't work.
@DarkFool
Hmm.. the block fire spreads to is decided outside of my code. I can only decide if it shouldn't. So apparently fire can jump up to 3 blocks, so it's valid to jump from a burnable block to a burnable block that is accessed "through" a fireproof block. Again, the fire will burn if any one of adjacent blocks is burnable. I suppose we could add a config item to change that to burn in a block only if all adjacent blocks are burnable.
I've verified that Ticket 5 is still fixed. if you want, please start a new ticket and post screenshots of the block configurations that are causing you trouble.
@filbert66
Bukkit version: 1.4.7-R1 (#2704). Minecraft version: 1.5.1.
It's the same type of fire spread as ticket 5 had. If you light fires underneath floating burnproof blocks, it will spread up the sides/bottoms of those burnproof blocks, as well as to blocks under it.
If you make a line of burnproof blocks on flat ground, then light a fire next to one of those burnproof blocks, it will spread to the top of other non-burnproof blocks adjacent to those burnproof blocks. And since nothing gets destroyed, the spread can respread to those same blocks repeatedly, until the fire burns out faster than it spreads.
It won't spread to the tops of other burnproof blocks, though, from what I've seen -- but it seems like it will allow using the burnproof blocks as valid ways to check for spreading paths. Though that last part is just a guess.