HEndFight - End-Fight Access Control & Multi-Spawn Balancer
HEndFight is a high-performance, event-driven access control and multi-spawn manager for the End dimension. Designed for Paper, Folia, and CanvasMC (1.21.x), it closes the End until your event starts, spreads incoming players across load-balanced landing points instead of crowding them onto a single obsidian platform, counts down to the fight via a shared boss bar, and automates dragon rewards and announcements.Engineered specifically for 500+ player environments, HEndFight maintains zero per-player memory overhead, executes tasks event-driven without per-tick scans, and uses single-instance scheduling.
Technical Specifications
- Server Compatibility: Paper, Folia, or CanvasMC on Minecraft 1.21.x (api-version: 1.21, folia-supported: true).
- Java Requirement: Java 21+
- Integrations (Soft-Dependencies): HoneySpawn (smart eviction routing) and SkinsRestorer (skin rendering for announcements). Both integrations use reflective hooks; no external JARs are required during runtime or build.
- Architecture: Fully asynchronous and Folia region-safe.
Key Features
- Absolute End Access Control: /hef toggle opens or closes the End. Closing the End automatically evicts all players inside to safe spawn locations.
- Multi-Portal Bypass Prevention: Intercepts portal entry across all vectors: walking in, riding in via vehicle (boat, minecart, horse), relogging inside a closed End, or being forced inside by third-party plugins.
- Load-Balanced Landing Points: Define multiple spawn points with /hef setspawn. Entering players are automatically routed to the emptiest point based on lowest fill ratio, respecting configurable per-point player caps.
- Interactive Countdown Engine: Tracks event starts via a global boss bar. During the final seconds, it triggers an anchor-charging effect and sound, culminating in an explosion that opens the End.
- Dragon Kill Announcements & Skin Rendering: Displays dragon-slayer alerts in chat alongside a custom 8-line ASCII/Component head rendered directly from the killer's skin texture.
- Staggered Reward Queue: Pays out participant rewards (for landing a hit) and killer rewards (for the final blow) via console commands. Payouts are throttled per tick to prevent server lag.
- CanvasMC Support: Automatically detects CanvasMC and hooks into its specialized asynchronous events (EntityPortalAsyncEvent / EntityPostTeleportAsyncEvent) to bypass traditional PlayerPortalEvent limitations.
Commands and Permissions
All administrative commands require the hendfight.admin permission (Default: OP).Available Aliases: /hendfight, /endfight, /hef.
| Command | Description |
| /hef toggle [on|off] | Manually opens or closes the End. Closing evicts all current players inside. |
| /hef countdown start [sec] | Closes and clears the End, then starts a countdown timer. Automatically opens the End at zero. |
| /hef countdown stop | Halts the active countdown timer; the End remains closed. |
| /hef countdown reset | Resets the active timer back to its initial duration and continues running. |
| /hef setspawn <id> [max] | Creates or updates a spawn point at your location. max sets a hard player cap. |
| /hef delspawn <id> | Deletes an existing landing point by its ID. |
| /hef list | Displays a list of all configured landing points alongside their real-time player counts. |
| /hef status | Reports End state (open/closed), active spawn points, and detected soft dependencies. |
| /hef tp [id] | Teleports the caller to a specific landing point (or to the emptiest if no ID is specified). |
| /hef reload | Reloads config.yml, messages.yml, and endspawns.yml. |
Configuration Reference
Primary Options (config.yml)
YAMLsettings:
default-open: true # Initial state on first startup (superseded by state.yml afterwards)
end-worlds: [] # Target arena worlds (empty array auto-detects all THE_END worlds)
load-balancer:
default-max-players: 50 # Default player cap assigned when using /hef setspawn without a limit
teleport:
sound:
key: "entity.enderman.teleport"
fallback:
honeyspawn: true # Routes evicted players using HoneySpawn's balancer if present
world: "world" # Fallback world when HoneySpawn is absent
eviction:
on-world-change: true # Evicts players attempting to enter a closed End via external teleports
on-join: true # Evicts players who log in inside a closed End
countdown:
enabled: true # Master toggle for the countdown system
default-seconds: 60 # Duration used when /hef countdown start is executed without arguments
bossbar:
enabled: true
color: "PURPLE"
overlay: "PROGRESS"
charge:
seconds: 3 # Visual/audio anchor charge duration before opening (0 to disable)
sound: "block.respawn_anchor.charge"
open:
sound: "entity.generic.explode"
dragon:
announce:
enabled: true
head: true # Renders the killer's head in chat beside the kill message
announce:
entry:
enabled: true
seconds: 30 # Time window after the End OPENS where join alerts display (0 = always)
rewards:
enabled: true # Master switch for rewards
participant:
commands: # Commands executed for all players who damaged the dragon
- "eco give {player} 500"
killer:
commands: # Commands executed for the killer (stacks on top of participant rewards)
- "eco give {player} 2500"
commands-per-tick: 20 # Max reward commands executed per tick to prevent server lag
Messaging & Formatting (messages.yml)
Messages support MiniMessage, HEX codes (d5fff, <#7d5fff>, #7d5fff), legacy ampersand codes (&c), and a custom <center> tag to center text in the chat window.Available Placeholders: {prefix}, {time}, {player}, {id}, {count}, and {world}.
Soft Integrations
- HoneySpawn: When present, players evicted from a closed End are routed through HoneySpawn's balanced /spawn system. If absent, players return to the world configured in settings.fallback.world.
- SkinsRestorer: Fetches player textures to draw the killer's skin head beside the death message. If absent, the engine falls back to standard profile textures.
