
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.
Advanced TreeCapitator 1.4.0
release14 мая 2026 г.[1.4.0] — 2026-05-14
Fixed
- [CRITICAL] Forced Java 21 requirement — The
pom.xmlcompile target has been lowered from Java 21 to Java 17. Previously the plugin threwUnsupportedClassVersionErroron any server running Java 17 (Paper 1.20.x, Purpur, Pufferfish, most shared hosting providers). No source changes were needed because the code does not use any Java 21-specific APIs. - [CRITICAL] Protection plugin bypass — Extra log blocks (every block other than the
origin) were broken with
breakNaturally()without first firing aBlockBreakEvent, meaning WorldGuard, GriefPrevention, Lands, and Residence had no opportunity to intervene. A dedicatedBlockBreakEventis now fired for each extra block before it is broken; if any protection plugin cancels that event, the block is silently skipped. - [CRITICAL] Missing anti-recursion guard — The protection-plugin fix above fires
BlockBreakEventprogrammatically, which caused the plugin's own listener to trigger again for each block, creating an infinite loop. AbreakingTreesSet<UUID>now marks any player whose felling session is currently in progress; the listener returns immediately if the player's UUID is already present. The set is always cleared inside afinallyblock so a player can never get permanently stuck. - [MEDIUM] BFS linking two nearby trees — The 26-direction BFS could follow diagonal
log connections to merge two adjacent trees into one oversized fell. A new
MAX_HORIZONTAL_DISTANCE = 8constant (Manhattan X+Z distance from the origin block) causes BFS to skip any candidate block beyond that threshold. The value of 8 is wide enough to accommodate Big Oak and Dark Oak canopies without bridging two separate trunks. - [MEDIUM] No config value validation — Values such as
max-blocks: -1ordamage-multiplier: -100were loaded directly into fields, producing undefined behaviour (negative BFS limits, inverted durability).clamp()andclampDouble()helpers have been added toConfig.reload(); all numeric values are now constrained to a valid range (e.g.max-blocks→[1, 1000],damage-multiplier→[0.1, 10.0]).
Clarified (not a bug)
- Double durability damage (analyst report #2) — The audit report claimed that
breakNaturally(tool)automatically reduces the tool's durability in the player's inventory, causing damage to be applied twice alongsideDurabilityHandler. After reviewing the Paper API source:Block.breakNaturally(ItemStack)uses theItemStackonly to determine drop calculations (Fortune, Silk Touch) and does not modify the item in the player's inventory.DurabilityHandlerremains the sole source of durability loss. No double damage occurs.
Changed
- Lowered the supported
api-versionfrom Paper 1.21 to Paper 1.20.4+, broadening compatibility without requiring any 1.21-specific API. - Added Javadoc to
TreeFinder,TreeCapitatorTask, andConfig.
Not Fixed (planned v1.5.0)
- Folia incompatibility — The plugin schedules work with
BukkitScheduler.runTask(), which is incompatible with Folia's region-based threading model. A proper fix requires migrating toRegionScheduler/GlobalRegionSchedulerand is planned for v1.5.0.
Advanced TreeCapitator 1.3.0
release26 апреля 2026 г.[1.3.0] — 2026-04-25
Fixed
-
PALE_OAK_LOGbypassedrequire-leavescheck —isOverworldLog()was missingPALE_OAK_LOGfrom its switch statement, meaning Pale Oak trees were treated the same as Nether stems (no-leaf bypass). Withrequire-leaves: true, a Pale Oak log structure built by a player would be incorrectly felled. AddedPALE_OAK_LOGto the overworld log list so it is correctly guarded. -
Fragile reference-equality trim check — The condition that decided whether leaves should be broken used
trimmedLogs == logsToBreak(Java reference equality) instead of an explicit boolean. While this happened to work correctly, it was subtle and error-prone. Replaced with a dedicatedwasTrimmedboolean flag for clarity and safety.
Added
-
TreeCapitatorEvent(Plugin API) — A new cancellable Bukkit event fired just before any tree is felled. Other plugins can now listen toTreeCapitatorEventto:- Cancel the felling via
event.setCancelled(true). - Inspect the full set of logs and leaves that will be broken.
- Grant custom rewards (economy, XP, quests) based on
event.getLogs().size().
- Cancel the felling via
-
leaf-durability-ratioconfig option (default:10) — Controls how many leaf blocks count as one durability hit whenbreak-leaves: true. Previously hardcoded to1/10, this is now fully configurable. Set to1to make every leaf cost a durability point; set higher to reduce tool wear from leaf breaking. -
MUSHROOM_STEMsupport — Added a commented-out entry inconfig.ymlforMUSHROOM_STEM, enabling huge-mushroom felling. Uncomment to activate.
Refactored (God Class split)
-
TreeFinder(new class) — Extracted all BFS log-finding and leaf-scanning logic fromTreeCapitatorTaskinto a dedicated utility class.isOverworldLog()andisLeaf()helpers moved here. -
DurabilityHandler(new class) — Extracted all durability calculation and application logic (getRemaining,calcMaxExtraBreaks,applyDamage) into a dedicated utility class. -
TreeCapitatorTaskis now a lean orchestrator: BFS → leaves → trim → event → break → durability → effects.
Advanced TreeCapitator 1.2.5
release17 апреля 2026 г.[1.2.5] — 2026-04-17
Fixed
- Nether stems, Warped stems, and Bamboo Block now work correctly with
require-leaves: true.
Improved
- Highly optimized BFS: uses
ArrayDeque, scans leaves only once, adds Manhattan distance, and usesHashSet. - Cleaner, more maintainable code.
Advanced TreeCapitator 1.2.4
release4 апреля 2026 г.[1.2.4] — 2026-04-04
Fixed
- Large trees (Jungle Giant, Dark Oak) could not be felled — When a tree exceeded
max-blocks(default: 100), the plugin aborted the entire felling operation and only the single broken log was harvested. This made giant Jungle trees (200-500 blocks) and large Dark Oaks impossible to chop efficiently. The plugin now performs a partial chop — it breaks logs up to the configuredmax-blockslimit instead of doing nothing. The remaining logs can be harvested with additional chops. - Off-by-one in max-blocks check — Changed from
>to>=so the limit is correctly enforced at exactlymax-blocks. - Big Oak trees not fully harvested — The BFS search for logs was limited to 6 directions (face-adjacent only), causing the capitator to miss logs that are only diagonally adjacent. Big Oak trees have irregular structures where some logs only touch at corners. The search is now 26-direction (3×3×3 cube) to catch all connected logs.
Advanced TreeCapitator 1.2.3
release27 марта 2026 г.[1.2.3] — 2026-03-27
Added
require-leavesoption (default:true) — Before felling, the plugin now checks that the log cluster has at least one adjacent leaf block. If none are found, the capitator does nothing. This prevents accidental activation on player-built log structures such as house walls, cabin roofs, or log-block decorations. Set tofalseto restore the old behaviour.
Fixed
- Durability did not limit felling — Tool durability was calculated and applied after all blocks were already broken. A nearly-broken axe (1 durability remaining) could silently fell a 100-log tree and would simply be destroyed at the end. The task now calculates the maximum number of extra logs the remaining durability permits before breaking any blocks, and trims the set accordingly. Unbreaking level is respected in this pre-check as well.
