added denyjoinfrom permission

This commit is contained in:
ajgeiss0702
2020-07-15 19:04:04 -07:00
parent 43a6489502
commit e24f00bc35
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -69,6 +69,7 @@ public class Main extends Plugin implements Listener {
d.put("errors.player-only", "&cThis command can only be executed as a player!"); d.put("errors.player-only", "&cThis command can only be executed as a player!");
d.put("errors.already-connected", "&cYou are already connected to this server!"); d.put("errors.already-connected", "&cYou are already connected to this server!");
d.put("errors.cant-join-paused", "&cYou cannot join the queue for {SERVER} because it is paused."); d.put("errors.cant-join-paused", "&cYou cannot join the queue for {SERVER} because it is paused.");
d.put("errors.deny-joining-from-server", "&cYou are not allowed to join queues from this server!");
d.put("commands.leave-queue", "&aYou left the queue for {SERVER}!"); d.put("commands.leave-queue", "&aYou left the queue for {SERVER}!");
d.put("commands.reload", "&aConfig and messages reloaded successfully!"); d.put("commands.reload", "&aConfig and messages reloaded successfully!");
@@ -442,6 +442,11 @@ public class Manager {
return; return;
} }
if(p.hasPermission("ajqueue.denyjoinfron."+p.getServer().getInfo().getName())) {
p.sendMessage(msgs.getBC("errors.deny-joining-from-server"));
return;
}
if(server.isPaused() && pl.config.getBoolean("prevent-joining-paused")) { if(server.isPaused() && pl.config.getBoolean("prevent-joining-paused")) {
p.sendMessage(msgs.getBC("errors.cant-join-paused", "SERVER:"+pl.aliases.getAlias(server.getName()))); p.sendMessage(msgs.getBC("errors.cant-join-paused", "SERVER:"+pl.aliases.getAlias(server.getName())));
return; return;