Inactive [FUN/MECH] ChopTree 1.24 - Chop Trees by Removing Lowest Block - Like Cacti [1000] (by Arcwolf)

Discussion in 'Inactive/Unsupported Plugins' started by askmeaboutlo0m, May 1, 2011.

  1. Offline

    askmeaboutlo0m

    ChopTree - Chop trees like cacti or make logs move down while chopping
    Version: 1.24


    ATTENTION:
    There seems to be a plugin conflict where the client crashes with a blue-white screen and keeps crashing for minutes after that.
    If you encounter the error please give me a list of the plugins you are using, with enough lists I will be able to outrule what causes it. Please also tell me if you are using any client-side mods.


    Thanks very much to Arcwolf for developing version 1.24!

    Tested with Craftbukkit build [740], [766], [798], [818], [1000].
    Supports: Permissions v. 2.7.2 (Phoenix) and mcMMO v. 1.0.07.
    Please give me feedback, ask any questions you like and/or provide suggestions!
    Thank you!

    Features:
    • Lets trees act like cacti - remove a block and all blocks above are yieled too.
    • Or you can make that log blocks move down one by one instead - no more climbing trees.
    • Works with all three tree types (they all yeild their own wood).
    • Also works with "big" trees that have multiple branches - makes felling them a lot easier.
    • Restrict using this plugin to certain tools only.
    • Supports mcMMO and Permissions.
    • Only works on trees, houses made of logs are safe!
    • Chunk protection to make your tree houses safe.
    Download (JAR file) | Source (ZIP file)


    Description:
    This plugin was requested by Britich and is inspired by the Canary plugin RealTree by billyoyo.
    However, it is not just a simple port of that plugin, it was made from scratch after Britich's description.

    Pictures:
    Show Spoiler

    [​IMG]
    Approach tree...

    [​IMG]
    ...and punch it.

    [​IMG]
    All logs will be yielded.

    [​IMG]
    The leaves will decay like normal.


    Set-up:

    Even though I added a lot of things for version 1.2 it will act like the original one if you don't change any settings - with the exception of players are able to toggle the plugin.​
    To run this plugin just copy it into your plugins folder. On first startup it will create a ChopTree folder and a ChopTree.properties file, which you can edit.​
    There will be a ChopTree.players file which saves player toggles and a ChopTree.chunks file which saves protected chunks.​


    Properties File:
    Show Spoiler

    The ChopTree.properties file will look like this when first created:
    Code:
    # -ChopTree Properties-
    # You can add or change the command and toggle command aliases here.
    # Because of technical limitations the console commands will always be "ChopTree" and "ct", but the in-game comments will be taken from here.
    
    Command = ChopTree, ct
    Toggle = ToggleChop, tc
    
    # Here you can change the options (can also be done in-game).
    
    ActiveByDefault = true
    UseAnything = true
    MoreDamageToTools = false
    InterruptIfToolBreaks = false
    SupportMcmmoIfAvailable = true
    TreeFellerNeeded = false
    LogsMoveDown = false
    OnlyTrees = true
    
    # -Material List-
    # If the "UseAnything" option is false, the plugin will take the items you can use to chop trees with from here.
    # You can either put in the material's name or its ID.
    
    mat = WOOD_AXE
    mat = STONE_AXE
    mat = IRON_AXE
    mat = GOLD_AXE
    mat = DIAMOND_AXE
    
    Command and Toggle can be changed manually by just adding more aliases for them, seperated by commas. Note that if you run the command from the console it will always have the aliases "ChopTree" and "ct", no matter what it says in your file.
    You can also remove either of the lines to disable the command for players completely.

    The options can be changed manually in the file too. To find out which option has which effect look at the "Commands" section below.

    The material list will only be used if the option UseAnything is false. In that case you can specify which items players can use to chop trees with this plugin, other items will not trigger plugin effects (except chunk protection). You can either use the item ID or it's name.
    If you want to make tree chopping more costly you can only allow gold axes for example.
    List of item IDs on Minecraft Wiki, list of all item names in the Bukkit documentation.


    Commands:
    Show Spoiler

    ChopTree - show status of all options.
    ChopTree (option) - show status of specified option.
    ChopTree (option) (true/false) - switch option on or off.
    ChopTree chunk - shows if your current chunk is protected.
    ChopTree protect - deactivates the plugin in your chunk.
    ChopTree fullprotect - disables destroying logs in general (not only with plugin) in your chunk.
    ChopTree reload - reloades changes from your properties file (the normal reload won't do that)
    ToggleChop - toggles the plugin on and off for a player.

    (option) can be:
    ActiveByDefault - choose if plugin will be toggled on or off for players (on).​
    UseAnything - if activated players can use any item to chop trees, else materials list will be used (off).​
    MoreDamageToTools - toggles damage to tools for every chooped log (off).​
    InterruptIfToolBreaks - if activated tree chopping will interrupt if the tool breaks (off).​
    SupportMcmmoIfAvailable - if activated plugin will support mcMMO if it can find it (on).​
    TreeFellerNeeded - choose if players need to have mcMMO's tree feller enabled (off).​
    LogsMoveDown - if activated logs will move down when chopped instead of popping like cacti (off).​
    OnlyTrees - if enabled only trees can be chopped, else all logs can be (on).​
    EnableOverride - if enabled choptree.override nodes can be used (off)​



    Aliases:
    Show Spoiler

    ct or "command" in properties file for ChopTree.
    tc or "toggle" in properties file for ToggleChop.
    c for chunk.
    p for protect.
    f or full for fullprotect.
    r for reload
    a or default for ActiveByDefault.
    u or anything for UseAnything.
    m or damage for MoreDamageToTools.
    i or interrupt for InterruptIfToolBreaks.
    l or down for LogsMoveDown.
    o or trees for OnlyTrees.
    e or override for EnableOverride.


    Permissions:
    Show Spoiler

    Permissions node - description (default if you are not using Permissions)

    choptree.chop - chop trees using this plugin (all)

    choptree.command.check - check what status the options have (all)
    choptree.command.change - change status of options (ops)
    choptree.command.toggle - toggle plugin per player (all)
    choptree.command.protect - protect/unprotect chunks (ops)
    choptree.command.chunk - see if the chunk is protected (all)
    choptree.command.reload - reload properties file (ops)

    Override nodes will be ignored if EnableOverride is false.

    choptree.override.moredamagetotools - will not have tools damaged for every log (off)
    choptree.override.useanything - can use any item (off)
    choptree.override.interruptiftoolbreaks - chopping won't interrupt when the tool breaks (off)
    choptree.override.treefellerneeded - tree feller is never needed (off)
    choptree.override.onlytrees - can chop all logs, not only trees (off)
    choptree.override.chunkprotection - chunk protection will be ignored (ops)


    To Do:
    • (Medium) Test with WorldGuard, remove conflict
    • (Medium) Enhance isTree algorithm a bit more
    • (Medium) Add [tools], [non-tools] and [hands] to material list
    • (Low) Add configurable drops
    • (Low) Add automatic sapling replant
    Changelog:
    • Version 1.24 by Arcwolf - Download (JAR file) | Source (ZIP file) - July 28. '11
      • Removed deprecated methods
      • Fixed mcMMO compatibility
      • Updated for Craftbukkit build [1000]
    • Version 1.23 - Download (JAR file) | Source (ZIP file) - June 02. '11
      • Fixed an error with iron axe receiving double damage as if it wasn't an axe
      • Added /ct reload command to reload changes from properties file
    • Version 1.22_2 - Download (JAR file) | Source (ZIP file) - June 01. '11
      • Recompiled for Minecraft 1.6.6/Craftbukkit [818]
    • Version 1.22_1 - Download (JAR file) | Source (ZIP file) - May 22. '11
      • Fixed chunk protection Permissions
    • Version 1.22 - Download (JAR file) | Source (ZIP file) - May 22. '11
      • Fixed chunk protection
    • Version 1.21 - Download (JAR file) | Source (ZIP file) - May 16. '11
      • Added EnableOverride option (off by default) to fix wildcard problem
    • Version 1.2 - Download (JAR file) | Source (ZIP file) - May 14. '11
      • Rewrote tree finding algorithm
      • Fixed some bugs leading clients to crash
      • Fixed and extended Permissions support
      • Added toggle commands
      • Added mcMMO support
      • Added option that player has to have mcMMO's TreeFeller enabled
      • Added optional damage to tools
      • Added optional tools list to restrict using this plugin only with certian tools
      • Added option to let trees go down one by one instead of popping like cacti
      • Added chunk-wise protection
      • Included plugin.yml into source download
      • Probably more
    • Version 1.1 - Download (JAR file) | Source (ZIP file) - May 5. '11
      • Added Permissions support
      • Fixed bug with some pine trees not being chopped
    • Version 1.0 - Download (JAR file) | Source (ZIP file) - May 1. '11
      • Initial Release
     
  2. Offline

    askmeaboutlo0m

    You don't change that permission, just wait a moment, I added an option to disable override :p
    Download link will be up shortly.

    //Version 1.21 is up.
     
  3. Offline

    Maxis010

    Or as you keep failing to mention they can remove individual permissions, it will take about a minute to add another line or 2 removing the override permissions which saves the hassle of having to keep an old plugin on your server thereby losing out on bug-fixes and upgrades

    Besides, if you do it now for ChopTree then you can do it again for the next plugin with overrides, by then Permissions v3.# will be stable (I hope) so you can start doing wildcard removal

    EDIT: Thanks for adding the config option to disable the override but removing permissions is still a good thing to know
     
  4. Offline

    askmeaboutlo0m

    I am not sure if I am understanding you right.
    Do you mean removing Permissions by allowing every other node and just leaving out "choptree.override.*"?
    So that the end result looks kinda like
    - 'rah.blah.*'
    - 'rah.bluh.*'
    - 'choptree.chop'
    - 'choptree.command.*'
    etc.?
     
  5. Offline

    Maxis010

    No, they can do it like this

    - '*'
    - -choptree.override.onlytrees

    I've had to do this for multiple plugins when I've wanted to disable things in some worlds (or in general) , with the release of Permissions 3 my files will be a lot cleaner but I'll still use -'*' and remove permissions I don't want/need
     
  6. Offline

    Stahlbrand

    Right after some of my members hit the tree. BOOM their clients went kaput. Then couldnt log in unless someone was right in their chunk or tped them out b4 they logged off.

    2011-05-17 01:33:34 [INFO] Whitelist: Player Kavic1986 is trying to join...
    2011-05-17 01:33:34 [INFO] allow!
    2011-05-17 01:33:34 [INFO] Kavic1986 [####] logged in with entity id 20055
    2011-05-17 01:33:34 [WARNING] Failed to handle packet: java.lang.NullPointerException
    java.lang.NullPointerException
    at net.minecraft.server.ItemStack.d(ItemStack.java:95)
    at net.minecraft.server.ItemStack.f(ItemStack.java:103)
    at net.minecraft.server.InventoryPlayer.canHold(InventoryPlayer.java:124)
    at net.minecraft.server.EntityItem.b(EntityItem.java:205)
    at net.minecraft.server.EntityHuman.i(EntityHuman.java:212)
    at net.minecraft.server.EntityHuman.u(EntityHuman.java:204)
    at net.minecraft.server.EntityPlayer.u(EntityPlayer.java:212)
    at net.minecraft.server.EntityLiving.p_(EntityLiving.java:231)
    at net.minecraft.server.EntityHuman.p_(EntityHuman.java:90)
    at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:169)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:273)
    at net.minecraft.server.Packet10Flying.a(SourceFile:126)
    at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:372)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
     
  7. Offline

    St3vYb0y

    Ah that was something I had looked for, couldn't find it in the documentary for permissions.
    But maybe the toggle solution is a bit smoother.
    Thanks for that askmeaboutl00m :)
     
  8. Offline

    Sparky20

    I love this, so much.
     
  9. Offline

    askmeaboutlo0m

    That looks like a conflict with another plugin since it worked when another player was in their chunk.
    What do you mean "typed them out"?
    Can you give me your ChopTree.properties and a list of plugins you're running?
    What was different about the occasions where your members chopped a tree compared to the other ones?
    I need that to solve the problem.

    Thank Maxis010 for that, I didn't know you could do that either :p

    Sweet.
     
  10. Offline

    Maxis010

    The tped them out is teleporting them out of the chunk, it's a wierd bug that I've known to be caused by TNT and fire, the minecraft server prioritises the explosion and fire calculations which results in chunks not transmitting to the player
    The client eventually considers this a problem and disconnects
    The problem is the client will then refuse that chunk so you need to be teleported to force the client to re-request the relevant chunks

    I've never heard of the bug occurring outside of those conditions so I'd guess it's something to do with the way ChopTree is removing the tree's or as you said there is some conflict between ChopTree and something else
     
  11. Offline

    askmeaboutlo0m

    Ohhh, teleported them out.
    ChopTree removes logs by calculating the choopped logs, putting them in a list, setting them to AIR and spawn a log item on that spot.
    Sounds very much like a conflict, yes.

    //I can think of a possibility.
    I actually manually set the broken block to AIR and the event to cancelled.
    Another plugin might not have its BlockBreakEvent returning if the event is cancelled and starts throwing null pointers.
     
  12. Offline

    Stahlbrand

    Okay well, I see there is a worldguard conflict I am using worldguard.
    I run about 30 plugins including this one. I reverted back to 1.1 and its working fine but no permissions. Wanted to make it a subscriber only plugin but like it alot so keeping it around till next week when i try your next update.
    Here is a list of plugins I use:
    Towny, LWC, Iconomy, IConomyChestShop, Falsebook, MCMMO, Money2XP, Essentials(Core+Spawn), World Edit, Worldguard, GroupManager, Log Block, nSpleef, PVP Control, ModTRS, OChestDump, Stargate, MCBANS, uquest, Runecraft, Gills, Chop Tree, OpenINV, automessage, claygen, herochat.

    All are updated except for essentials its at 2.8 to keep from conflicting with towny. And of course ChopTree.

    If you are wondering if in falsebook and runecraft i got the dangerous ic's and runes disabled that would be a big yes.

    Hope this info helps.
     
  13. Offline

    Tal-N

    We're running mcMMO, FireLord, Commandbook and Worldguard. The client lags out when the tree being cut down is more than 3-4 blocks tall. Smaller trees are fine. The issue is strange because after reconnecting you can maintain connection as long as you aren't looking AT the tree and move away. If you look anywhere near the tree the lag hits and you disconnect from the server. Once the leaves have all gone the area is safe to approach so I suspect there is an issue with leaf decay causing the disconnect. Why it is only happening when you look at the tree I dunno.

    (edit)
    Ok I can see why it needs someone else nearby to allow someone to reconnect. It's because leaf decay works on the same principle as crops. They only progress if the chunk is in use and that requires someone to be nearby. I just tried to lag back in after several minutes, when I turned to look at the tree I saw it wasn't fully decayed yet... right before the client crashed. After a few more reconnects the tree will be gone and I'll be able to play again normally.

    (edit)
    checked it wasn't the HD texture pack I was using. Crash occours with default textures within Minecraft.

    Ok here is some more information. Because I log in and I'm facing away from the tree I was able to move some distance away. When I looked back the tree was still there and continued to decay. I slowly moved closer and only disconnected when the game started to display the Wood blocks from the tree which were still on the ground and on the leaf blocks. It seems the crash is related to the Wood blocks themselves once they are dropped.

    (edit) tree is gone. safe to continue. knocked some blocks out of a nearby tree with 3-4 wood. No crash. Very odd.

    (edit)
    confirmed. the client crashes when you try to chop a tree which is more than 4 wood blocks tall. Seems coincidental that cacti and sugar cane, which follow the same effect, only grow to 3 blocks tall....

    We've found that anyone attempting to approach the tree is fine right up to the point where they see the Wood blocks. They then get disconnected as well.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  14. Offline

    askmeaboutlo0m

    Since it works with 1.1 it's likely that it is because I changed the block breaking behaviour to a much "cleaner" one.
    I can work around that and then maybe you can see if the conflict remains.

    That is some very, very strange behavior.
    It sounds very much like a conflict with another plugin. Can you try disabling any other plugin and then running ChopTree?
    FireLord and mcMMO are less likely to cause problems, WorldGuard seems to conflict however because it doesn't like how I break the blocks.
    I will try to work out those conflicts but it would be good to know which plugins cause them so I don't have to work myself through too many configurations and source codes.
     
  15. Offline

    theguruofreason

    This doesn't seem to be working with TreeFeller on my server. Here are my properties parameters:

    ActiveByDefault = true
    UseAnything = true
    MoreDamageToTools = true
    InterruptIfToolBreaks = true
    SupportMcmmoIfAvailable = true
    TreeFellerNeeded = true
    LogsMoveDown = false
    OnlyTrees = true
    EnableOverride = false

    I first had UseAnything set to false and it wasn't working (even though all the axes are listed in materials), then I changed it to true and it still doesn't work. Using TreeFeller and chopping the bottom block of a tree does the normal TreeFeller effect of mcMMO. I did only try this on trees I made with saplings and bonemeal, and I am also using KeepGrowing (plugin). I'll test with natural trees and see if this works.

    EDIT1: Just tested, same result with natural (server generated) trees.
     
  16. Offline

    askmeaboutlo0m

    I just checked, it works for me with your exact options.
    Did you try if the plugin works at all by using the default options?
    If you didn't, do try that.
    Also you may want to try disabling that KeepGrowing plugin, maybe it interferes with ChopTree. Are you using any other plugins?
     
  17. Offline

    ghostsoldier23

    When I try to protect a chunk, it just returns "Unprotected Chunk: coordinates"

    I'm using /choptree protect

    Is this a glitch or am I doing something wrong?
     
  18. Offline

    askmeaboutlo0m

    I'm getting the same error, so it's a glitch.
    Lemme check what's causing it, I'll update the plugin when I fixed it.
     
  19. Offline

    false_chicken

    This has stopped working for me all the sudden. I Had this working with 766 then I updated to the newest recommended build and it suddenly stopped. So I reverted back and still no luck. All the permission nodes are set correctly and the settings are exactly the same as they where. So Idk whats happening. I can still execute the commands and I get no errors in the server output. It says its activated but chopping a tree acts as default. Any suggestions?
     
  20. Offline

    askmeaboutlo0m

    Testing newest build right now.
    I'll check if it works for me. Then I'm going to upload the thing I just fixed.
    You can try then to delete all ChopTree files and redownload the plugin.

    Fixed and uploaded new version, thanks for bringing it to my attention.

    I just checked, it works for me.
    Try deleting the ChopTree folder and .jar file and redownload the plugin in it's new version.
    Tell me if it works again :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  21. Offline

    ghostsoldier23

    No problem! Thanks for your help!

    Oh and I feel I should add... this plugin is amazing. :)
     
  22. Offline

    kaasinees

    Can you add dates to the changelog/download link? Thanks :D
     
  23. Offline

    ghostsoldier23

    Erm.... nevermind. Unfortunately I'm still getting the error. Take a look:

    Edit: Not nevermind on the thank you though! Your help is greatly appreciated!
     

    Attached Files:

  24. Offline

    askmeaboutlo0m

    I can, but if you want to know a specific date you could just check when I made the post about it :p
    Gonna add the dates though.

    Does it say you're using version 1.22 on server startup? Just double check, I make errors like that all the time :p
    And does the chunk's grass turn to dirt and back to grass? It's supposed to do that to show you the chunk. If not then it sounds very much like a plugin conflict.
    Try running "/ChopTree full" and then try it with the normal "/ChopTree protect" again.
    Maybe an error occurred while you were trying around, that should fix it.
    If that doesn't work try around with "/ct c" if that one spits out the right message (and if the grass blinks).
    And eventually delete the ChopTree.chunks file.
    If you're still encountering errors it might be a plugin conflict.
     
  25. Offline

    ghostsoldier23

    Oh uh... it says 1.21

    Is the .jar 1.22 right now? I swear I did redownload and replace...
     
  26. Offline

    askmeaboutlo0m

  27. Offline

    ghostsoldier23

    Redownloaded and it works now :D

    Although I protected a chunk, destroyed a log and the cacti effect still occurred.... but then I tested it again elsewhere and the protect function seemed to work. Idk...

    Is the protect function supposed to protect trees from the "cacti effect" as well?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  28. Offline

    askmeaboutlo0m

    Maybe it was just being slow or the tree was just barely out of the chunk.
    Are you using Permissions? With Permissions if you have an override active the protection might get ignored.
    And if you aren't using Permissions and are an op the protection will always be overridden.

    //Yes, that's what the protect function does :p
    Protect disables the plugin in the given chunk and fullprotect doesn't let you chop logs in the chunk at all.
    Oops double post.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  29. Offline

    ghostsoldier23

    I am using Permissions but override is disabled.

    I have tested it and it seems that even in protected chunks trees still obey the plugin but if you just stack a few logs the plugin is inactive.

    Idk if this is a glitch or.... I am an op. Test it yourself and tell me what happens.
     
  30. Offline

    askmeaboutlo0m

    Gonna test it.
    Can you just paste the contents of your options file here?
    //Ah, I found the error. If I am an op it overrides it, gotta fix that too.
     
  31. Offline

    ghostsoldier23

    The options file is the same as I downloaded it as. Whatever your default is, that is my options file.

    I just finished testing it. Even with Permissions linked to the plugin, OP override still exists.

    When I deopped myself, the protect function worked on trees. When I reopped myself, it went back to overriding the protection.
     

Share This Page