mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 17:18:37 +01:00
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:
parent
e12f1b5022
commit
c4f10d9c1d
@ -55,7 +55,7 @@ public class Commandtpa extends EssentialsCommand {
|
|||||||
user.sendMessage(tl("requestAcceptedFromAuto", player.getDisplayName()));
|
user.sendMessage(tl("requestAcceptedFromAuto", player.getDisplayName()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return;
|
throw new NoChargeException();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!player.isIgnoredPlayer(user)) {
|
if (!player.isIgnoredPlayer(user)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user