# Barrier - v2.0.21 ## PacketEvents Migration, Helper Methods & Damage Fixes This update removes the EntityLib dependency in favor of direct PacketEvents rendering, adds convenience helper methods to the API, introduces new commands, and fixes several storm damage bugs. --- ### API UPDATES - **Movement Helpers** — New convenience methods on `IStorm`: - `moveUp(double value)` / `moveUp(double value, int time)` - `moveDown(double value)` / `moveDown(double value, int time)` - `moveTo(Location location)` / `moveTo(Location location, int time)` - **Size Helpers — Radius (Circle)**: - `shrink(double value)` / `shrink(double value, int time)` - `expand(double value)` / `expand(double value, int time)` - **Size Helpers — Area (Width & Length)**: - `shrinkArea(double value)` / `shrinkArea(double value, int time)` - `expandArea(double value)` / `expandArea(double value, int time)` - **Size Helpers — Height**: - `shrinkHeight(double value)` / `shrinkHeight(double value, int time)` - `expandHeight(double value)` / `expandHeight(double value, int time)` - **Control Helpers**: - `stop()` — stop all movement and resizing - `stopMoving()` — stop movement only - `stopResizing()` — stop resizing only - **Query Helpers**: - `isMoving()` — check if the storm is currently moving - `isResizing()` — check if the storm is currently resizing - Bumped **Barrier-API** to `1.0.34`. --- ### PLUGIN UPDATES - **PacketEvents Migration** — Replaced EntityLib with a custom `PacketEntity` class built directly on PacketEvents. Storm display entities are now rendered using raw packet-based entity management with bundled packet ordering for atomic updates. - **Java 21** — Upgraded from Java 17 to Java 21. - **PacketEvents 2.11.1** — Updated from 2.9.4. --- ### PLUGIN FIXES - **Health exceeding max** — Fixed `IllegalArgumentException` when setting player health above max (e.g., after a Health Boost effect expires). Health is now clamped to `player.getMaxHealth()`. - **Absorption damage spillover** — Absorption hearts now correctly absorb damage with overflow carrying to health, matching vanilla behavior. Previously, absorption blocked an entire damage tick regardless of remaining absorption amount. - **Totem hand priority** — Totem detection and consumption now consistently checks offhand first, matching vanilla behavior. - **Storm display entity flickering** — Fixed visual flickering caused by the EntityLib migration. New PacketEntity spawns entities invisibly first, then reveals them to prevent visual artifacts. - **Null entity on quit/teleport/death** — Added null-safety checks for display entities during player quit, teleport, and death events. --- ### COMMANDS - `/worldborder stop_moving` — Stop border movement only (position changes). Validates that the storm is actually moving before executing. - `/worldborder stop_resizing` — Stop border resizing only (size changes). Validates that the storm is actually resizing before executing. - Enhanced `/worldborder stop` to use the new `storm.stop()` helper internally.