Skip to content

Fix double charge for /tpa when target has /tpauto on - #4862

Merged
mdcfe merged 1 commit into
2.xfrom
fix/tpauto-double-charge
Mar 20, 2022
Merged

Fix double charge for /tpa when target has /tpauto on#4862
mdcfe merged 1 commit into
2.xfrom
fix/tpauto-double-charge

Conversation

@mdcfe

@mdcfemdcfe commented Mar 19, 2022

Copy link
Copy Markdown
Member

Information

This PR fixes#4854.

Details

Proposed fix:
If a player uses /tpa to request a teleport to someone with /tpauto enabled, /tpa manually creates a charge for the teleportation.
This PR changes the subsequent code to throw a NoChargeException instead of returning, meaning only the AsyncTeleport charge is applied, not the standard command one.

Environments tested:

OS: Windows 11 22000.556

Java version: Eclipse Temurin 17.0.1+12

  • Most recent Paper version (1.18.2, git-Paper-264)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:

2022-03-19_15-49-32_javaw

@mdcfemdcfe added this to the 2.20.0 milestone Mar 19, 2022
@mdcfemdcfe added bug: confirmed Confirmed bugs in EssentialsX. type: bugfix PRs that fix bugs in EssentialsX. labels Mar 19, 2022
@mdcfe
mdcfe merged commit c4f10d9 into 2.xMar 20, 2022
@mdcfe
mdcfe deleted the fix/tpauto-double-charge branch March 20, 2022 11:19
PureGero pushed a commit to CritterzNFT/Essentials that referenced this pull request Apr 20, 2022
If a player uses `/tpa` to request a teleport to someone with `/tpauto` enabled, `/tpa` manually creates a charge for the teleportation. This PR changes the subsequent code to throw a `NoChargeException` instead of returning, meaning only the `AsyncTeleport` charge is applied, not the standard command one.
FixesEssentialsX#4854.
@mdcfemdcfe modified the milestones: 2.20.0, 2.19.5Jul 7, 2022
ressidell pushed a commit to ressidell/Essentials that referenced this pull request Apr 27, 2025
If a player uses `/tpa` to request a teleport to someone with `/tpauto` enabled, `/tpa` manually creates a charge for the teleportation. This PR changes the subsequent code to throw a `NoChargeException` instead of returning, meaning only the `AsyncTeleport` charge is applied, not the standard command one.
FixesEssentialsX#4854.
rewsdjad1 pushed a commit to rewsdjad1/EssentialsXPlus that referenced this pull request Aug 13, 2026
If a player uses `/tpa` to request a teleport to someone with `/tpauto` enabled, `/tpa` manually creates a charge for the teleportation. This PR changes the subsequent code to throw a `NoChargeException` instead of returning, meaning only the `AsyncTeleport` charge is applied, not the standard command one.
FixesEssentialsX#4854.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug: confirmedConfirmed bugs in EssentialsX.type: bugfixPRs that fix bugs in EssentialsX.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TPAing to someone with tpauto on and command costs on charges twice

2 participants

@mdcfe@pop4959