Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 theBACKandTPAbranches. Truth table before: only (global=1, specific=1) bypassed. After: either node bypasses on its own.NORMALbranch 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)
Demonstration:
Live-server repro via two bots + LuckPerms,
teleport-cooldown: 10, EssentialsX2.22.1-dev+24-49a2f10(unpatched) vs this branch (patched):Before (unpatched) — Tester holds only
essentials.teleport.cooldown.bypass.back(global unset), second/backwithin 10s:Time before next teleport: 5s← blocked, bypass.back dead on its ownControl — granting global
essentials.teleport.cooldown.bypass→/backsucceeds immediately (pipe itself works; bug is in the boolean logic).After (patched) — same setup, second
/backwithin cooldown succeeds immediately ← bypass.back alone skips cooldown. (Note: test server ran with zh locale; messages are the standardtimeBeforeTeleport/ back-success strings.)Full repro steps in my comment on #6626. Companion to #6627 (whois half).