Cristichi's Tree Capitator
Tested on 1.21!
The latest build has been tested and works for 1.21.*, 1.20.*, 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 feel free to leave here any issues you may encounter or your suggestions if you want to, I'll read them.
Features
Please note that only the latest build supports ALL of the following features.
- 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 will get a notification if a new update is out and 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 themselves. You can also configure if you want a message to remind players of their current setting when they log in.
- Players are not able to break logs in protected areas (by WorldGuard or other protection plugins using WorldGuard as a dependency).
- Axes are damaged accordingly.
- Switch on/off if axes should be prevented from being broken. So that you can repair that nice axe with Mending or an anvil and never worry about it being broken. (only works when breaking logs with it, breaking anything else will destroy the axe anyway)
- 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 in this configuration so that 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.
- Customize what are trees! Configure any block to be treated as tree logs or as tree leaves for this plugin. Scroll down to see more specific steps on this page.
- Ask for new features by DM or by commenting here! I'll try to consider and answer 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.
How to add blocks as logs or leaves
You can configure other blocks to be detected as if they were logs or leaves, like the stripped logs or blocks from mods, or any block you want.
- Make sure you are using v6.4.0 or higher of this plugin.
- Check the name of the blocks in this link https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html.
- Go to the folder YourServerDirectory/plugins/CrisTreeCapitator where the configuration file is and open extra_logs.json or extra_leaves.json, and edit the files to include the blocks you want (as named in the previously mentioned link). Be careful to follow the format.
- Reload the server OR type /tc reload to apply the changes.
Keep it always up to date!
During startup you will receive a notification in the chat and the server console if the plugin needs to be updated. With a simple command you will be able to check new updates and update the plugin in-game.
I always recommend to keep the plugin up to date to make sure that you are benefiting from new features, general improvements and any bug fixes.
Compatibility with older versions.
If your server is running a Minecraft version older than 1.13, 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 Minecraft 1.13.
Need help?
Please feel free to contact me through DM or by commenting in this page. I do not have much free time to answer, but I will be sure to answer you as soon as possible. I will be happy to help on any issues that you are having, and consider every feature request that would make the plugin better for your server.
Future plans
My intention for the future of the plugin is to keep providing updates for new Minecraft versions, especially if there are any significant changes to the game like new trees or new features that would help this plugin's implementation. Additionally, I will provide support for any issues or bugs encountered by players, and I will consider any new features suggested as well. Please, feel free to let me know your feedback, good or bad.
Thank you for reading, and happy minecrafting!
well... it destroys my server cause it cuts a entire forest if i destroy just one block of the tree... not laughed so loud anymore xD
In reply to Forge_User_41591396:
That's why I added a limit you can configure, either using the plugin's commands or editing the config file.
I love this plugin!
Can you add the option to auto-pickup all items from trees?
In reply to maelep_ttv:
Thanks a lot! I've tried it a few times but I don't manage to do it without lagging the server, but maybe I'll try again today :3
In reply to Cristichi:
You can probably try to look at AutoPickup source (source) code to have some idea :)
I already tried this plugins with yours but it didn't works, block from your trees don't auto-pickup
In reply to maelep_ttv:
I took a look at the plugin's page, the thing is that the blocks you break with my plugin are actually broken by the plugin, not the player. Maybe there is some way to say to the server that that player destroyed them, I'll look for it :3
In reply to Cristichi:
That could be sooo great 😍
In reply to Cristichi:
You can try to contact the owner to make your plugins compatible :) He can probably detect when your plugins is enabled =D
In reply to maelep_ttv:
It would be nice but I can work aside with his plugin, I just need to add his plugin to my build and work smart so my plugin won't crash if his plugin is not present on the server. But again, it would be nice.
Problems:
- Doesn't take durability as if you cut it down by hand, it should take ONE block's worth of damage at least!
- Often cuts down a bunch of SEPARATE trees! I only want it to cut one tree at a time, but not set a limit! (As some trees are quite large)
You should have an option for which axes break trees. I'd like only diamond axes to break trees on my server :)
edit: There would also be nice with an option for not breaking the leaves.
How I Give 'cristreecapitator.vip' permission node to All players???
Thx
In reply to raicky1197:
Look for it on Craftbukkit/Spigot support forums. But if you are going to give vip to all players, just disable vip mode instead.
In reply to Cristichi:
Sorry i meant cristreecapitator.user
How i give that permission for survival players in my server?
And thank you for reply
In reply to raicky1197:
Np. If you use a certain plugin to manage permissions, look for it's documentation. If not, read this article https://bukkit.gamepedia.com/Permissions.yml
It explains the basics for permissions. Good luck!
Hi!! Thank you for your nice plugin. But sometime I want to disable it when I build a house made of log wood. Do you have any command to do it ? or, could you add this feature?
Thanks :)
P.S. I want the feature like below.
enter "/tc on" to enable this plugin, or "/tc off" to disable it.
In reply to gaojie429:
Maybe if I can pick some time from my day I'll work on how to do it. Thanks for commenting it :3
In reply to Cristichi:
You could make the plugin check if there are leaves to confirm that it's a tree, and add the option to config the minimum amount of leaves for the plugin to consider it a tree
This is more of a suggestion but is it possible to add in the plugin that it takes longer to break the tree as an option. For example I would like my players to chop down a tree easily without adventuring into the depths of the branches but not destroy the tree as quick as normal or whole forests could be ruined in seconds (Yes I know about the auto-replant which is awesome but this would be a nice option to start with)
In reply to Forge_User_36155732:
As a side note too I only seem to be getting this error popup in console whenever I'm trying to break a tree as a member with the permission
28.05 02:15:34 [Server] ERROR Could not pass event BlockBreakEvent to CrisTreeCapitator v5.5
28.05 02:15:34 [Server] INFO org.bukkit.event.EventException: null
28.05 02:15:34 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:499) [spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:484) [spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at net.minecraft.server.v1_12_R1.PlayerInteractManager.breakBlock(PlayerInteractManager.java:290) [spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at net.minecraft.server.v1_12_R1.PlayerInteractManager.a(PlayerInteractManager.java:217) [spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:889) [spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at net.minecraft.server.v1_12_R1.PacketPlayInBlockDig.a(SourceFile:40) [spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at net.minecraft.server.v1_12_R1.PacketPlayInBlockDig.a(SourceFile:10) [spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_211]
28.05 02:15:34 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_211]
28.05 02:15:34 [Server] INFO at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:748) [spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_211]
28.05 02:15:34 [Server] INFO Caused by: java.lang.NoSuchMethodError: org.bukkit.block.Block.getBlockData()Lorg/bukkit/block/data/BlockData;
28.05 02:15:34 [Server] INFO at main.TreeCapitator.onBlockBreak(TreeCapitator.java:120) ~[CrisTreeCapitator.jar:?]
28.05 02:15:34 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_211]
28.05 02:15:34 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_211]
28.05 02:15:34 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_211]
28.05 02:15:34 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_211]
28.05 02:15:34 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot131.jar:git-Spigot-7754231-94b0980]
28.05 02:15:34 [Server] INFO ... 17 more