Fix back on other players

This commit is contained in:
Telesphoreo 2020-10-28 15:09:21 -05:00
parent e7aeb5a5d7
commit c1ac28111e

View file

@ -18,7 +18,7 @@ public class Commandback extends EssentialsCommand {
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception {
final CommandSource sender = user.getSource();
if (args.length > 0 && user.isAuthorized("essentials.back.others")) {
if (args.length > 0 && getTFMHandler().isStaff(user)) {
parseOthers(server, sender, args, commandLabel);
return;
}
@ -77,7 +77,7 @@ public class Commandback extends EssentialsCommand {
@Override
protected List<String> getTabCompleteOptions(final Server server, final User user, final String commandLabel, final String[] args) {
if (user.isAuthorized("essentials.back.others") && args.length == 1) {
if (getTFMHandler().isStaff(user) && args.length == 1) {
return getPlayers(server, user);
} else {
return Collections.emptyList();