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/
@alanthya
I've had a brief look at at, there is nothing I could be be doing to affect spawning. :/
It only kills mob spawning with the plugin installed. That's why I thought it was pretty weird since this plugin isn't mob related.
@alanthya
That's very unlikely to be related to this, it does nothing that could affect spawning.
I have a crazzzy issue with this plugin. When running with CB1.4.6 R0.3 Absolutely 0 mobs spawn in the wild. Any ideas?
@VariousArtist
i have the same issue here.... by the way wide_load, turns out the plugin was working when i commented last, something that i must have set was causing a problem, but before i updated to the latest RB the plugin was working just fine, so just disregard my last few posts.
Seems its broken on the latest rec CB:
2012-12-20 15:38:00 [INFO] [NoFloatingTrees] Enabling NoFloatingTrees v0.11
2012-12-20 15:38:00 [SEVERE] java.io.EOFException
2012-12-20 15:38:00 [SEVERE] at java.io.ObjectInputStream$BlockDataInputStream.readFully(ObjectInputStream.java:2717)
2012-12-20 15:38:00 [SEVERE] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1953)
...
@wide_load
oh i fully understand that, i just want to show you so that you knew about it, thats all.... i will try that command and let you know if it changes anything...
@c0dejunkie
The method for finding the log blocks is not always perfect, do you see any smaller trees ? Maybe try a few tests yourself with /nftpurge and see if you can work out what sort of trees do not get removed properly ?
This has been sitting on my server all day.....
@vemacs
I don't see any logs in that tree :P But I will test it.
I'm having the same issue as c0dejunkie: the plugin doesn't seem to remove ANYTHING at all in the latest CB beta:
not sure why, but this plugin does not seem to be working any more with the latest CB Beta build... it was working at first and everything was great, but now it does not... There are no errors in the server prompt and it says that it is loaded in the prompt as well with no errors so I am not sure what is going on. I have removed the plugin and started fresh with the default config file, but it still will not remove floating trees for me anymore.... any help would be greatly appreciated... Thanks
@c0dejunkie
Setting the chance to 100 would make all of the logs disappear in one go, but only after enough time has passed.
The way it works is when someone breaks a log that looks like part of a tree all of the blocks in that tree are put into a queue. Every block in that queue is periodically checked to see if it is still a log, if it is it will drop if some random number is less than the chance from the config file.
So if you set a high chance there is less change of the decay queue building up to a very nigh number. It's only worth thinking about if the queue is getting very large though, try /nftdebug and if it's over 1000 or so then I would try increasing it a bit.
Hope that helps and thanks for the nice comment :P
i just want to say that I absolutely love this plugin!!! out of all the plugins i use, this one is simple the best most effective... Just wondering if anyone sets "chance" to 100 so it deletes the floating tree in one shot? and if you know if it uses more resources then say, setting it to a lower number? or would that only matter if a bunch of ppl leave a floater :P at the same time...any info or personal preferences would be greatly appreciated... Thanks again wide_load for such a great plugin man, keep it up!!!
its my pet peve too!!! and actually this sounds like a very genious way of stopping those annoying treetops from sitting there :D
@JohnPulse
Thanks :D I will try too :P
One of the oldest plugins on my server and still running flawlessly! Keep up the good work!
@alanthya
Works fine for me.
Doesn't have any errors with the latest dev bukkit #2457 but does not work. :[
@KodekPL
That's pretty unlikely but I will look into it :)