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 | b0d06ce6ed62657e3f6b541aa63079f8fadc1126 (patch) | |
tree | 6b62bfad69e7bba889b6164f8d4a4b38256c89bd | |
parent | de1554cb680b0fc588e505dd296a780681dc3a97 (diff) | |
download | Essentials-b0d06ce6ed62657e3f6b541aa63079f8fadc1126.tar Essentials-b0d06ce6ed62657e3f6b541aa63079f8fadc1126.tar.gz Essentials-b0d06ce6ed62657e3f6b541aa63079f8fadc1126.tar.lz Essentials-b0d06ce6ed62657e3f6b541aa63079f8fadc1126.tar.xz Essentials-b0d06ce6ed62657e3f6b541aa63079f8fadc1126.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")); } |