Option to prevent joining paused queues
This commit is contained in:
@@ -68,6 +68,7 @@ public class Main extends Plugin implements Listener {
|
|||||||
d.put("errors.already-queued", "&cYou are already queued for that server!");
|
d.put("errors.already-queued", "&cYou are already queued for that server!");
|
||||||
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("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(server.isPaused() && pl.config.getBoolean("prevent-joining-paused")) {
|
||||||
|
p.sendMessage(msgs.getBC("errors.cant-join-paused", "SERVER:"+server.getName()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(p.getServer().getInfo().getName().equals(s)) {
|
if(p.getServer().getInfo().getName().equals(s)) {
|
||||||
p.sendMessage(msgs.getBC("errors.already-connected"));
|
p.sendMessage(msgs.getBC("errors.already-connected"));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -95,3 +95,8 @@ wait-after-online: 1
|
|||||||
# When this enabled, if servers are offline then it will spam errors. You can ignore them.
|
# When this enabled, if servers are offline then it will spam errors. You can ignore them.
|
||||||
# Default: false
|
# Default: false
|
||||||
pinger-debug: false
|
pinger-debug: false
|
||||||
|
|
||||||
|
|
||||||
|
# When a queue is paused, should we prevent players from joining it?
|
||||||
|
# Default: false
|
||||||
|
prevent-joining-paused: false
|
||||||
|
|||||||
Reference in New Issue
Block a user