Cristichi's Tree Capitator
Updated to 1.19.3
The latest build has been tested and works for 1.19.*, 1.18.*, 1.17.*, 1.16.*, 1.15.*, 1.14.* and 1.13.*. I recommend using the latest build always in servers running on those Minecraft versions. I'm also still around so please leave your suggestions here if you want to, I'll surely read them.
Thank you for the 149k downloads!
I do not have much time for working on new features but expect to see new updates with very useful things!
Features
Please note that only the latest build supports ALL of the following features. The latest build works for 1.19.*, 1.18.*, 1.17.*, 1.16.*, 1.15.*, 1.14.* and 1.13.*.
- Let users destroy entire trees by breaking only 1 log. Even the biggest tree will fall!
- Works on nether trees (If server is +1.16).
- Auto-update. You don't need to come back here to download the plugin again when new features come out.
- It also destroys all leaves around.
- Auto-replant. Replanted saplings can also be automatically protected so they cannot be broken until they grow a tree.
- Switch on/off if an axe is required and/or damaged.
- VIP mode. Use it to restrict access to the benefits of this plugin, for premium users for example.
- Each player can toggle on/off the plugin for himself. Choose if you want a message to remind players when they log in.
- Players are not able to break trees in protected areas (by WorldGuard and most other protection plugins), even if they try to break a log block that is outside in order to break log blocks inside the protected area.
- Axes are damaged accordingly.
- Switch on/off if axes should be prevented from being broken.
- Switch on/off if tree leaves should be ignored by the plugin. Enabling it will make the plugin take down only connected logs, reducing the lag and balancing a little bit.
- Crouch mode. Use true to make crouching players not trigger this plugin. Use inverted to make standing players not trigger this plugin, or false to make crouching not change how this plugin works.
- Ask for new features by DM or this page! I'll try to answer and consider every suggestion.
Commands/Configuration
- /tc help: Lists all commands.
- /tc toggle: Toggles the plugin for you. Just in case you made your home using lots of logs.
- /tc update: Checks for new updates, and updates if able.
- /tc reload: Reload config.yml changes.
- /tc setLimit <number>: Sets the limit of blocks this plugin can destroy at once. (-1 for unbounded)
- /tc setReplant <true/false>: Sets if trees should be replanted. True by default.
- /tc setInvincibleReplant <true/false>: Sets if replanted saplings should be unbreakable by survival players. False by default.
- /tc setAxeNeeded <true/false>: Sets if an axe is required for the plugin to work. True by default.
- /tc setDamageAxe <true/false>: Sets if the axe used is damage (only takes place if an axe is needed). True by default.
- /tc setBreakAxe <true/false>: Sets if the axe used can be broken (only takes place if an axe is needed and damaged). False by default.
- /tc setVipMode <true/false>: Sets if vip mode is on. False by default.
- /tc setNetherTrees <true/false>: Sets if the plugin works on the new nether "trees". False by default.
- /tc setStartActivated <true/false>: Sets if this plugin is activated for players when they enter the server. If false, players will need to use /tc toggle to activate it for themselves. True by default.
- /tc setJoinMsg <true/false>: Enables or disables the join message that remind players about /tc toggle. True by default.
- /tc setIgnoreLeaves <true/false>: Makes the plugin ignore or not the leaves aroung logs. False by default.
- /tc setCrouchPrevention <true/false/inverted>: Defines if crouching allows players to break logs individually. If set to inverted, players must crouch to break multiple logs with this plugin. False by default.
You may also use /treecap or /treecapitator as valid aliases for the /tc command.
Permission nodes
- cristreecapitator.user: Always required to take down trees fast.
- cristreecapitator.admin: Required to change options by commands.
- cristreecapitator.vip: Required to take down trees fast when Vip Mode is enabled.
How to Install
- Place your downloaded .jar file into YourServerDirectory/plugins/.
- Start or reload server.
- Then you may configure the plugin just the way you want, either using commands OR editing the config file and then typing /tc reload in the in-game chat (with cristreecapitator.admin permission/OP) or in the server console.
How to use VIP mode
VIP Mode enables an easy switch for the plugin. If VIP Mode is enabled regular users won't be able to use this plugin by default because they will also need an additional permission.
- Enable vip mode (/tc setVipMode true).
- Give 'cristreecapitator.vip' permission node to VIP players.
- It's already done! VIP players will be the only ones allowed to cut down trees faster! Don't worry, average players can still get wood, but the vanilla way.
If your server is NOT running 1.13.*, 1.14.*, 1.15.*, 1.16.*, 1.17.*, 1.18.* or 1.19.*, please click here to download v3.0.1 instead. It won't have all the advantages and performance of the latest version so please consider updating your server to at least MC 1.13.
In reply to mrmirchi:
Hi! Sorry to hear that. If it's my plugin the one you can't use, try using /treecap instead. If it's towny the one you can't use, I don't know if I could do something about it. Could you please tell me which towny are you using? I quickly checked https://www.spigotmc.org/resources/towny-advanced.72694/ but I didn't see any /tc command. I don't have a lot of time to check it further. Thank you in advance and have a nice day.
In reply to Cristichi:
I'm using towny chat with towny, sorry, I should have said that earlier. And thanks for the treecap thing I didn't know that was there lol
In reply to mrmirchi:
Don't worry! I believe it says so nowhere, I should add the different aliases in the main page of this plugin (oops). Thank you for the warning!
I'm still looking for a plugin that can increase the time it takes to chop the base, depending on the size of the tree, so it isn't quite as easy to log a forest.
Is it possible to require a specific type of axe? I see that the /tc setAxeNeeded is a boolean operation, but I'd love to do something like /tc setRequiredAxe wooden so that players can only destroy entire trees with that specific axe. This circumvents the need to use a protection plugin when players are chopping down logs that are part of structures they have built (since they could swap to another axe).
In reply to heymatt:
I submitted a pull request for this feature albeit with a slightly different command syntax: https://github.com/Cristichi/CrisTreeCapitator/pull/9.
In reply to heymatt:
Hi there. Thanks for the suggestion, it is something I considered at first, but after some thinking I though that the basic block limit does that function as well and limiting the kind of axes would be more confusing to players that enter the server than useful so I never added it.
In reply to Cristichi:
The block limit doesn't allow a non-admin player to prevent a tree from falling down ad hoc. There's not an effective way to use the block limit to create the same functionality since block limits are arbitrary. Imo, it seems more confusing to have to explain to players that there's an arbitrary block limit to how many blocks their axe can destroy (since there's no real reason other than "it's arbitrary") compared to just telling players "Use a wooden axe if you want trees to fall instantly. Otherwise, use any other axe if you don't, like when working on your own buildings."
In reply to heymatt:
I guess players can just use /tc toggle if they want to achieve this same functionality.
In reply to heymatt:
For that functionality I already implemented the toggle function, which I understand it's not ideal but it's not too bad either because you don't change from working on your hourse to chop forest trees every 5 seconds anyway. Also, what do you mean saying the block limit is "arbitrary"? It's there because when I started this project my pc was a potato with some cables so all my tests servers would crash if too many blocks were destroyed at once and decided to leave it there just in case someone needed it.
In reply to Cristichi:
Yeah you're right, it's not a problem at all. I don't mean that the block limit feature is arbitrary. The motivation behind the block limit makes sense to me. It's the number an admin could set as the block limit that is arbitrary. Regardless, this is a non-problem for me now that I'm gonna get people to use /tc toggle :)
how do you reset /tc setLimit<number>? or recommended number to put it as?
In reply to twmyz:
Hello,
The default value is -1 (no limit), and I'd recommend it that way, probably.
Hope it helps, have a nice day!
Is there a way to detect Structures? Because this plugin will not detect self-placed blocks.
In reply to xJonah129:
I don't know of any way to make the plugin detect or get the information of what placed a block where it is because neither Minecraft nor spigot saves that information into every block. Also, making it analice a region of blocks to know if it "looks" "unnatural" can be tricky and can't be done perfectly, along with the lag it would generate (think about world edit, when you have to use something that is not just replacing every block in a region, and we have to take into account that world edit does a lot of very difficult and complicated tricks to improve performance). So, unless Minecraft of Spigot makes it possible to know if a block was placed by hand or by the terrain generator or other plugins, there is little I can do myself.
As a solution, while not perfect, you can try using protection plugins (based on worldguard, the one I support, which most use) to protect your log-made structures from others and using /tc toggle yourself to have it enabled only when you are going to the forest to get some wood.
Thanks for the question, I hope it helps and I didn't overdo the answer too much, and have a nice new year!
In reply to Cristichi:
Yes it helps thanks. But how can mods like FallingTree decide between tree and structure.
In reply to xJonah129:
Hi. Well, I never used that mod and I don't have the time to get a close look at how it does. I've seen tons of useful configurable options and that it works with branches but I don't know if it makes use of any resource that only a mod can do or use to prevent destroying other things. If any of those configurations allow the plugin to detect trees but not player-made structures made of logs I want to know so I will check if I have more time.
Have a nice day!
In reply to Cristichi:
There must be a way, as other tree chopping plugins can do it.
Hi, is it possible to make it so that the trees require leaves/wart blocks to chop down, so that it doesn't cut down every log in a build if a tree gets too close?
In reply to fletchblue:
He. I'm not really sure if it is posible. The thing is, identifying single trees is quite hard unless I want to lag the whole server every time someone breaks a log block. I'm afraid I don't know how I can do it properly with the current code, but I'm planning on making another configurable option of ignoring leaves so that only the directly connected logs are destroyed, which would match greatly with FastLeafDecay for single trees. I hope that update can help on the problem.
For a solution that will work now, I think you will have to rely on removing the tree's leaves and logs that are touching the house's logs manually and then cut the tree.
Best regards.