Skip to content

Let per-type teleport cooldown bypasses work without the global bypass - #6628

Open
zzzzzyc wants to merge 1 commit into
EssentialsX:2.xfrom
zzzzzyc:fix/tp-cooldown-bypass-6626
Open

zzzzzyc wants to merge 1 commit into
EssentialsX:2.xfrom
zzzzzyc:fix/tp-cooldown-bypass-6626

Conversation

@zzzzzyc

@zzzzzyc zzzzzyc commented Sep 18, 2026

Copy link
Copy Markdown

Fixes the cooldown half of #6626: AsyncTeleport.cooldownApplies() required BOTH the global and the per-type bypass node to skip the teleport cooldown, so essentials.teleport.cooldown.bypass.back/.tpa alone had no effect. Either node now bypasses on its own.

Information

This PR partially addresses #6626.

Details

Proposed fix:
One-operator fix in AsyncTeleport.cooldownApplies(): &&|| in the BACK and TPA branches. Truth table before: only (global=1, specific=1) bypassed. After: either node bypasses on its own. NORMAL branch untouched (global-only by design). cooldownApplies() is the single chokepoint — all teleport paths (/back, /tpa, /home, /warp, …) route through it, so one fix covers all callers.

Environments tested:
OS: Windows 11

Java version: 26.0.1 (server ran on Paper 26.1.2-74; built with Temurin 25.0.4.1)

  • Most recent Paper version (26.1.2, git-Paper-74)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:
Live-server repro via two bots + LuckPerms, teleport-cooldown: 10, EssentialsX 2.22.1-dev+24-49a2f10 (unpatched) vs this branch (patched):

Before (unpatched) — Tester holds only essentials.teleport.cooldown.bypass.back (global unset), second /back within 10s:
Time before next teleport: 5s ← blocked, bypass.back dead on its own

Control — granting global essentials.teleport.cooldown.bypass/back succeeds immediately (pipe itself works; bug is in the boolean logic).

After (patched) — same setup, second /back within cooldown succeeds immediately ← bypass.back alone skips cooldown. (Note: test server ran with zh locale; messages are the standard timeBeforeTeleport / back-success strings.)

Full repro steps in my comment on #6626. Companion to #6627 (whois half).

Fixes the cooldown half of EssentialsX#6626: AsyncTeleport.cooldownApplies()
required BOTH the global and the per-type bypass node to skip the
teleport cooldown, so essentials.teleport.cooldown.bypass.back/.tpa
alone had no effect. Either node now bypasses on its own.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant