NoFloatingTrees
NoFloatingTrees
Description
This plugin will try to remove any logs that are left floating in the air when a player cuts down a tree so that the leaves can decay. Floating leaves are a pet hate of mine and the current ways to tackle them seem to either involve giving the player lots of easy free wood or take up an awful lot of admin time.
Any tree that has been partially cut down will decay over time as leaves normally do 40 seconds after being cut. A log that decays naturally will have a 15% chance of dropping an item, this should discourage people from cutting down trees and then waiting for them to fall. All of these chances and timings can be changed via the config file.
If you have the LogBlock plugin installed, any blocks that this removes will be logged as the user NoFloatingTrees. Note this this will only work on trees that are cut down when the plugin is installed, there is not much that can be done about existing ones :(
Bug Reports / Suggestions
If you find a bug, encounter a problem or have a suggestion, please fill out a ticket via the Tickets link above. I do not have the time to read through the comments section, any comment that fits the previous three categories will be ignored.
Commands
/nft queue - Prints the number of blocks currently in the decay queue. To use this command you must have the nofloatingtrees.queue.size permission which also defaults to OPs only.
/nft purge - Used to removed all floating trees regardless of how close a player is. To use this command you must have the nofloatingtrees.queue.purge permission which defaults to OPs only.
Config
Default
use-logblock: true ignore-worlds: - world_nether - world_the_end decay: frequency: 2 wait-time: 40 chance: 15 drop-chance: 15
use-logblock
If this is set to false blocks removed by the plugin will not be logged even if LogBlock is found.
ignore-worlds
If you have worlds where people can't (or just don't) cut down trees you should list them here, this will improve performance slightly.
decay
frequency
How often floating logs should try to decay, in seconds.
wait-time
How long a log should stay floating before starting to decay, also in seconds.
chance
How likely it is for a low to decay per try this is a percentage so setting it to 100 will cause the entire tree to vanish in one go.
drop-chance
Similar to the above except this controls how likely it is for a decaying log to drop an item.
Contributing
Contributions to the project are very much welcome, if you have a feature that you want implemented and know a nice way to do it then consider forking the repo and submitting a pull request. These will be accepted as long as the following simple guidelines are followed.
- Do not edit the structure of the pom.xml file, feel free to add a dependency if you need it but the formatting and structure should not be changed.
- If you are exposing a new API method, add a JavaDoc comment to it, but don't over-comment internal code.
- Follow the existing code style, don't antagonise over every space though !
All dependencies that are used are now available from a public Maven repo, so you don't have to worry about building several other projects just to add a simple change any more.
Source Code
Dev Builds
Changes Since Last Release
Download
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
http://bukkit.jacekk.co.uk:8000/job/NoFloatingTrees/
This plugin is still fully compatible with 1.13... Man wtf
Compatible with 1.9.x
Does anyone know if this is compatible with 1.7.4? Floating trees are my HUGEST pet peeve! If this works it will keep my head from exploding.
Will you make it compatible with acacias?
Great plugin! One of my favorite!
@darkside2205
There are some checks to try and prevent buildings being detected as trees but it may make mistakes. I'd recommend you set up the LogBlock plugin too and enabled logging.
I want to use this plugin on my server, does it work with 1.6.2? and would it affect me if I cut out the middleor top of a tree and built a treehouse in it?
@x_clucky
Try breaking a free then doing /nft info to see if the decay queue size changed, there are some trees that it might not detect and they don't decay straight away. As for performance, it has to do a pretty complicated check on every block break, 4000ms is not so bad.
@wide_load
Sorry for long response, I often forget about this plugin. But when i say "not working" I mean what I say... It does absolutely nothing it appears. Last year it worked, however, for the longest time I haven't seen a single floating tree ever get removed, and I know for a fact it doesn't work because I see floating trees EVERYWHERE and I got this plugin long before I reset my maps... As for the timing data, here is the NoLagg examination file and I have included a screenshot below displaying that NFT is the most resource intensive plugin.
@FlOppythp
If it was done in the same way as for the trees it would be too intensive to check if it was floating since hills can be any number of blocked wide. The reasons it's okay for trees is that they are only 1 block wide.
@x_clucky
What do you mean by "not working" if you want me to look into performance you'll have to post your timing data.
This plugin hasn't worked for me in the last few months... Do you have any idea what could be wrong? It is also the most tick consuming plugin on my server (out of 72 different plugins, two of which being Orebfuscator and NoCheatPlus).
@Nikecow
WorldEdit has a tool for removing floaty trees that I use on my server. With any kind of tool in your hand type /tool deltree then right click on the trees. It still takes a while but is pretty accurate.
@brian163b
It was meant to be covered by the "when a player cuts down a tree" although looking at it now that's not all that clear. Thanks :P
Thanks for the great plugin!
When I first installed it I had the same question as Nikecow but figured it out via trial and error. I would suggest adding your answer to the description section above so when future comments bury your reply this limitation would be more obvious to new users.
@wide_load
Ok then just wondering :). Still an awesome plugin.
@Nikecow
It's never going to be possible in a clean way.
@wide_load
Perhaps you could scan only loaded chunks or maybe a command radius check ? Or is that still too intensive/hard to make?
@Nikecow
Yeah, only works on freshly cut trees. Scanning the entire world would be way too intensive.
Hey Wideload,
This seems like the plugin I've been looking for a long time. I just tested it and it works as intended but I have some questions. Is it possible to decay existing trees? I've got hundreds of them on my map and it would take a very long time to remove them all.
And it seems it only triggers upon mining the stump, is that correct?
Thank you.
@capobase
What's a snow tree ? A tree with snow on it or a pine tree (the ones in the Taiga biome) ?