mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-05 02:19:52 +01:00
Refactoring tpaccept perm check to include tpaall.
This commit is contained in:
parent
de1554cb68
commit
b0d06ce6ed
@ -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"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user