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

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 #4854.
This commit is contained in:
MD 2022-03-20 11:19:20 +00:00 committed by GitHub
parent e12f1b5022
commit c4f10d9c1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ public class Commandtpa extends EssentialsCommand {
user.sendMessage(tl("requestAcceptedFromAuto", player.getDisplayName()));
}
});
return;
throw new NoChargeException();
}
if (!player.isIgnoredPlayer(user)) {