1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-26 16:04:27 +02:00

Fix exploit with /tpaccept if sender no longer has permission

This commit is contained in:
Wolvereness
2012-02-09 23:14:57 -06:00
parent 0fb981a56d
commit 62b354a989

View File

@@ -22,7 +22,7 @@ public class Commandtpaccept extends EssentialsCommand
final User target = user.getTeleportRequest();
if (target == null
|| target.getBase() instanceof OfflinePlayer
|| (user.isTeleportRequestHere() && !target.isAuthorized("essentials.tpahere")))
|| (user.isTeleportRequestHere() ? !target.isAuthorized("essentials.tpahere") : !target.isAuthorized("essentials.tpa")))
{
throw new Exception(_("noPendingRequest"));
}