fix require-permission not being respected in /<server> commands
This commit is contained in:
+4
@@ -45,6 +45,10 @@ public class SlashServerCommand extends BaseCommand {
|
|||||||
sender.sendMessage(getMessages().getComponent("errors.player-only"));
|
sender.sendMessage(getMessages().getComponent("errors.player-only"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(main.getConfig().getBoolean("require-permission") && !sender.hasPermission("ajqueue.queue."+args[0])) {
|
||||||
|
sender.sendMessage(getMessages().getComponent("noperm"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
main.getQueueManager().addToQueue(main.getPlatformMethods().senderToPlayer(sender), server);
|
main.getQueueManager().addToQueue(main.getPlatformMethods().senderToPlayer(sender), server);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user