Skip to content

Conversation

@mdcfe
Copy link
Member

@mdcfe mdcfe commented Mar 19, 2022

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

@mdcfe mdcfe added this to the 2.20.0 milestone Mar 19, 2022
@mdcfe mdcfe 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.x Mar 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.

Fixes EssentialsX#4854.
@mdcfe mdcfe modified the milestones: 2.20.0, 2.19.5 Jul 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.

Fixes EssentialsX#4854.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug: confirmed Confirmed bugs in EssentialsX. type: bugfix PRs 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

3 participants