▶️ ЗАБЕРИ СВОИ 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.

321
1

Advanced TreeCapitator

Version: 1.3.0 | API: Paper 1.21+ | 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)
require-leaves guardChecks for adjacent leaves before felling — prevents accidental activation on player-built log walls and cabins
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
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.3.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.21+, Java 21+


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


License

Apache-2.0 © Duong2012G

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

Minecraft: Java Edition

1.21.x

Платформы

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

Сервер

Создатели

Детали

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