▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Плагины/Advanced TreeCapitator
Advanced TreeCapitator

Advanced TreeCapitator

Advanced TreeCapitator enables fast tree felling on Paper 1.21. Sneak with an axe to chop entire trees, with configurable durability loss, world restrictions, and a reload command.

453
2

Advanced TreeCapitator

Version: 1.4.0 | API: Paper 1.20.4+ | Author: Duong2012G
License: Apache-2.0 | Link: Modrinth

Fell an entire tree with a single axe swing — Fortune, Silk Touch, and realistic tool durability fully supported.


Features

FeatureDescription
BFS tree fellingFinds and breaks all connected logs using a 26-direction breadth-first search (handles Big Oak, Acacia, Dark Oak diagonal logs)
Horizontal BFS capLimits horizontal spread to 8 blocks from the origin — two nearby trees are never merged into one fell (added v1.4.0)
require-leaves guardChecks for adjacent leaves before felling — prevents accidental activation on player-built log walls and cabins
Protection plugin supportFires BlockBreakEvent for each extra block — WorldGuard, GriefPrevention, Lands, Residence can cancel individual blocks (fix v1.4.0)
Anti-recursion guardbreakingTrees set prevents the plugin from re-triggering itself when it fires protection events (fix v1.4.0)
Fortune & Silk TouchWork automatically on every block via breakNaturally(tool), no extra configuration needed
Durability pre-checkCalculates max breakable logs before breaking any — axe can never fell more than its remaining durability allows
Config validationAll numeric values are clamped to a valid range — a malformed config can no longer crash or break the plugin (added v1.4.0)
Configurable leaf costleaf-durability-ratio controls how many leaves equal one durability hit (default: 10)
Partial chopTrees larger than max-blocks are chopped up to the limit; remaining logs can be harvested with additional swings
Per-player toggleEach player can enable/disable tree felling with /atc toggle without affecting others
Plugin APITreeCapitatorEvent lets other plugins cancel felling or grant custom rewards based on tree size
World whitelist/blacklistRestrict which worlds allow tree felling
Nether & Bamboo supportCrimson Stem, Warped Stem, and Bamboo Block all supported; require-leaves is automatically bypassed for these
Particle & sound effectsConfigurable visual feedback on each fell
Hot reloadApply config changes with /atc reload, no restart needed

Installation

  1. Download AdvancedTreeCapitator-1.4.0.jar
  2. Place it in your server's plugins/ folder
  3. Restart or reload the server
  4. Edit plugins/AdvancedTreeCapitator/config.yml as needed
  5. Run /atc reload to apply changes without restarting

Requirements: Paper (or any Paper fork) 1.20.4+, Java 17+ (was Java 21 in v1.3.0)


Permissions

PermissionDescriptionDefault
advancedtreecapitator.useUse tree felling + /atc toggletrue (all players)
advancedtreecapitator.adminReload config with /atc reloadop

Commands

CommandDescriptionPermission
/atc toggleEnable or disable tree felling for yourselfadvancedtreecapitator.use
/atc reloadReload the configuration fileadvancedtreecapitator.admin

How to Use

  1. Hold an axe listed in tool-whitelist
  2. Sneak (Shift) if require-sneak: true
  3. Break the base log of a tree — the entire connected tree drops at once

Fortune: All logs and leaves receive Fortune bonus drops automatically.
Silk Touch: Logs and leaves drop as their block form instead of items.


Configuration Reference

# ── Activation ──────────────────────────────────────────────
enabled: true
require-axe: true          # must hold an axe from tool-whitelist
require-sneak: true        # must be sneaking (Shift)
require-leaves: true       # at least 1 adjacent leaf required — prevents structure damage

# ── Mining ──────────────────────────────────────────────────
max-blocks: 100            # max logs per fell (partial chop above limit)
cooldown-ms: 200           # per-player cooldown in milliseconds
break-leaves: false        # also break adjacent leaves

# ── Durability ──────────────────────────────────────────────
damage-axe: true           # apply durability loss proportional to blocks broken
damage-multiplier: 1.0     # durability cost per log block (Unbreaking respected)
leaf-durability-ratio: 10  # how many leaves = 1 durability hit (when break-leaves: true)

# ── Effects ─────────────────────────────────────────────────
particle-effect: true
sound-effect: true

# ── World Restrictions ───────────────────────────────────────
whitelist-worlds: []       # only these worlds (empty = all)
blacklist-worlds: []       # block these worlds (empty = none)

World Restrictions

# Allow only specific worlds:
whitelist-worlds:
  - world
  - world_nether

# Or block specific worlds:
blacklist-worlds:
  - creative_world

Adding Custom Log Types

Add any Material enum name (case-insensitive) to log-types:

log-types:
  - OAK_LOG
  - MUSHROOM_STEM   # enables huge mushroom felling
  # add more as needed...

Plugin API — TreeCapitatorEvent

Other plugins can hook into tree felling via the TreeCapitatorEvent:

import dev.duong2012g.atc.TreeCapitatorEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

public class MyListener implements Listener {

    @EventHandler
    public void onTreeFell(TreeCapitatorEvent event) {
        Player player   = event.getPlayer();
        int    logCount = event.getLogs().size();

        // Example: cancel felling in a specific region
        if (isProtectedRegion(player.getLocation())) {
            event.setCancelled(true);
            return;
        }

        // Example: reward economy based on tree size
        economy.depositPlayer(player, logCount * 0.5);
    }
}

Event fields:

MethodReturnsDescription
getPlayer()PlayerThe player who triggered the fell
getLogs()Set<Block> (unmodifiable)Log blocks scheduled to break (origin excluded)
getLeaves()Set<Block> (unmodifiable)Leaf blocks scheduled to break (empty if break-leaves: false)
setCancelled(true)Cancels the entire tree felling

Changelog

See CHANGELOG.md


Bug Fixes in v1.4.0

#BugStatus
1Forced Java 21 → UnsupportedClassVersionError on Java 17 servers✅ Fixed — compile target lowered to Java 17
2Double durability damage✅ Clarified — not a bug: breakNaturally(tool) does not touch inventory durability; it only uses the tool for drop calculation
3Accidentally felling player-built log structures✅ Already covered by require-leaves guard since v1.2.3; v1.4.0 adds horizontal BFS cap as a second layer
426-direction BFS merging two nearby trees✅ Fixed — added MAX_HORIZONTAL_DISTANCE = 8
5Bypassing protection plugins (WorldGuard, Lands…)✅ Fixed — BlockBreakEvent fired for every extra block
6No anti-recursion guard✅ Fixed — breakingTrees set prevents the listener from looping when it fires protection events
7Config accepts invalid values (max-blocks: -1)✅ Fixed — all numeric values are clamped on load
8Folia incompatibility⚠️ Not yet fixed — requires migration to RegionScheduler (planned v1.5.0)

License

Apache-2.0 © Duong2012G

Совместимость

Minecraft: Java Edition

1.21.x

Платформы

Поддерживаемые окружения

Сервер

Создатели

Детали

Лицензия:Apache-2.0
Опубликован:2 месяца назад
Обновлён:10 часов назад
Главная