From b0d06ce6ed62657e3f6b541aa63079f8fadc1126 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 11 Feb 2012 20:10:19 +0000 Subject: Refactoring tpaccept perm check to include tpaall. --- Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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")); } -- cgit v1.2.3