1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-22 06:12:56 +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 f0ee026fb9
commit 9efd0eb6f9

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"));
}