Docs
Lag Compensation
In competitive PvP games, severe server tick drops (lag spikes) often lead to "pearl eating", desynced trajectory hits, or unfair deaths when a player teleports into an unexpected location.
AerosPearls includes a dedicated Lag Compensation Engine that protects players from server-side performance issues.
How Lag Compensation Works
- Live TPS Monitoring: Hooks directly into the server's internal
recentTpsmetrics (via NMS reflection on 1.8.8 and modern Bukkit APIs on newer versions). - Impact Check: When a player's pearl lands, AerosPearls inspects the 1-minute rolling average TPS.
- Automatic Refund: If the server's TPS has fallen below your configured threshold (e.g.
17.5 TPS):- The teleportation is cancelled safely.
- The player is notified that server TPS is too low.
- The ender pearl is automatically restored to their inventory.
- The player's cooldown is instantly reset.
Configuration
In config.yml:
yaml
lag-compensation:
enabled: true
minimum-tps: 17.5Settings Explained
enabled: Toggles the lag compensation engine.minimum-tps: The minimum TPS required to allow pearl teleportation (default:17.5). Teleports occurring below this threshold will be refunded.