1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-12 01:25:26 +02:00

Refactoring tpaccept perm check to include tpaall.

This commit is contained in:
KHobbits
2012-02-11 20:10:19 +00:00
parent 6b5eb94176
commit cb8c095436

View File

@@ -22,7 +22,9 @@ public class Commandtpaccept extends EssentialsCommand
final User target = user.getTeleportRequest(); final User target = user.getTeleportRequest();
if (target == null if (target == null
|| target.getBase() instanceof OfflinePlayer || 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")); throw new Exception(_("noPendingRequest"));
} }