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/
-
View User Profile
-
Send Message
Posted Oct 28, 2012Looks like this plugin has problems with latest dev version of Bukkit. Hope it's only bukkit fault and it's gonna be fix :)
-
View User Profile
-
Send Message
Posted Oct 12, 2012@alanthya
Unfortunately yes, it would be way too resource intensive to scan the entire world so it has to work based on when you break blocks. If you have WorldEdit there is a tool for removing floaty trees, /tool deltree, then just right click on one to vanish it :P
-
View User Profile
-
Send Message
Posted Oct 12, 2012Does the purge command only with work for trees that were cut after this plugin was installed? I have a very large world on my server with many previously floating trees I would like removed. When I use /nftpurge false it tells me "0 blocks removed" Thanks for the great plugin!
-
View User Profile
-
Send Message
Posted Oct 8, 2012@wide_load
Think I did indeed remove a world before that. Anyway, would be nice to make the plugin not spam the server log every 2 seconds in that case, but just let the plugin remove the offending chunks from the .bin.
-
View User Profile
-
Send Message
Posted Sep 25, 2012@KSum
Nope that was ChopTree or Tree Assist or about 10 others.
@solegna
That happens if chunks have been removed I think, so you might have trimmed your map or regenerated a world ? Deleting the .bin file does fix it since it makes the plugin no longer check those chunks.
-
View User Profile
-
Send Message
Posted Sep 25, 2012Your plugin just started spamming this every 2 seconds:
00:09:23 [WARNING] [NoFloatingTrees] Task #16 for NoFloatingTrees v0.11 generated an exception java.lang.NullPointerException at uk.co.jacekk.bukkit.NoFloatingTrees.storage.DecayQueue.getDecayCandidates(DecayQueue.java:106) at uk.co.jacekk.bukkit.NoFloatingTrees.LogDecayTask.run(LogDecayTask.java:25) at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:52) at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:316) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:510) at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:213) at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:474) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406) at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)Nothing happened before that, in fact the server was empty and idle since startup, so no idea what might've caused it :o
This is on cb 2352 if that matters
Edit: Moving away block-locations.bin fixed it. Here's the old .bin if you want it for debugging: https://www.dropbox.com/s/sxojuhv53stzt4g/block-locations.bin
-
View User Profile
-
Send Message
Posted Sep 25, 2012Didn't this plugin used to make the tree drop down one block at a time when you chopped the first block on the ground? I love that feature.
-
View User Profile
-
Send Message
Posted Sep 23, 2012@Luzitano
Yeah it will work fine on large jungle trees, they only start to decay once they are detached from the ground.
-
View User Profile
-
Send Message
Posted Sep 22, 2012I tested this plugins and Thank you for this :) I just use Tree assist for Vips but i see many floating tres on my wilderness world.. This just helped me a lot :)
Btw.. i tryed on normal tree and pine .. didnt tested on jungles trees the 4log ones. does it remove them to? :)
-
View User Profile
-
Send Message
Posted Sep 20, 2012@xclucky
Updated, and made better ! No problem anyway :D
-
View User Profile
-
Send Message
Posted Sep 20, 2012I was so happy to see that this plugin was updated to 1.3.2 :D Keep up the great work @wide_load!
-
View User Profile
-
Send Message
Posted Sep 16, 2012@solegna
I use a custom method for registering commands, normally it's done by Bukkit from the plugin.yml file. So normally this error is hidden, it could indicate a more important problem though so I will leave it in.
-
View User Profile
-
Send Message
Posted Sep 16, 2012@wide_load
PluginManager is a plugin, yes. I'm not quite sure if it's really PM's fault though, it works with every other plugin (currently running 27 plugins on my server). But then again I'm not quite sure if the error is just hidden by other plugins.
Anyway, yes, the commands still do work, it's just a cosmetic thing.
-
View User Profile
-
Send Message
Posted Sep 15, 2012@SirComputer
No, why would you think that :s ?
-
View User Profile
-
Send Message
Posted Sep 15, 2012Do you have to op 'NoFloatingTrees' or not?
-
View User Profile
-
Send Message
Posted Sep 15, 2012@solegna
That will happen if the commands are already registered, that is probably the fault of PluginManager (assuming that is a plugin) since they should be un-registered when the plugin is disabled. Either way the commands are still registered so they might still work ?
-
View User Profile
-
Send Message
Posted Sep 15, 2012@wide_load
Thanks, helped much :)
Now there's one thing I noticed after tweaking my config a bit. When I reload NFT via PluginManager, I get this:
Would be great if you could either look into this or add a command to reload the config so I don't have to reload via PluginManager (although preferably the first for upgrading reasons)
-
View User Profile
-
Send Message
Posted Sep 14, 2012@solegna
wait-time is how long before a broken tree will decay, frequency is how often the logs will try to decay once wait-time is up and chance is the chance of a log decaying on each try. wait-time and frequency are both in seconds and the chance is a percentage. I'll make a section on the page about it ;)
-
View User Profile
-
Send Message
Posted Sep 14, 2012is there any documentation on the config? especially wondering what decay.chance does and how frequency/wait-time works (is it in seconds?)
-
View User Profile
-
Send Message
Posted Sep 3, 2012not work on 1.3.1 R2.0