diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-02-11 20:10:19 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-02-11 20:10:19 +0000 |
commit | cb8c0954367745550cc3be44c4d833ea09100b6a (patch) | |
tree | 18ce429b9b53275c84798a7d41dd29e03d2e331c | |
parent | 6b5eb9417640f778d35419a3a1a35a1309efc529 (diff) | |
download | Essentials-cb8c0954367745550cc3be44c4d833ea09100b6a.tar Essentials-cb8c0954367745550cc3be44c4d833ea09100b6a.tar.gz Essentials-cb8c0954367745550cc3be44c4d833ea09100b6a.tar.lz Essentials-cb8c0954367745550cc3be44c4d833ea09100b6a.tar.xz Essentials-cb8c0954367745550cc3be44c4d833ea09100b6a.zip |
Refactoring tpaccept perm check to include tpaall.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java index 456a77c37..891742043 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java @@ -22,7 +22,9 @@ public class Commandtpaccept extends EssentialsCommand final User target = user.getTeleportRequest(); if (target == null || target.getBase() instanceof OfflinePlayer - || (user.isTeleportRequestHere() ? !target.isAuthorized("essentials.tpahere") : !target.isAuthorized("essentials.tpa"))) + || (user.isTeleportRequestHere() && !target.isAuthorized("essentials.tpahere")) + || (!user.isTeleportRequestHere() && !target.isAuthorized("essentials.tpa") && !target.isAuthorized("essentials.tpaall")) + ) { throw new Exception(_("noPendingRequest")); } |