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

  1. Live TPS Monitoring: Hooks directly into the server's internal recentTps metrics (via NMS reflection on 1.8.8 and modern Bukkit APIs on newer versions).
  2. Impact Check: When a player's pearl lands, AerosPearls inspects the 1-minute rolling average TPS.
  3. 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.5

Settings 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.
Lag Compensation | AerosPearls Docs