will say that the player is not queued instead of sending an empty list
This commit is contained in:
@@ -97,6 +97,7 @@ public class Main extends Plugin implements Listener {
|
|||||||
d.put("commands.leave.more-args", "&cPlease specify which queue you want to leave! &7You are in these queues: {QUEUES}");
|
d.put("commands.leave.more-args", "&cPlease specify which queue you want to leave! &7You are in these queues: {QUEUES}");
|
||||||
d.put("commands.leave.queues-list-format", "&f{NAME}&7, ");
|
d.put("commands.leave.queues-list-format", "&f{NAME}&7, ");
|
||||||
d.put("commands.leave.not-queued", "&cYou are not queued for that server! &7You are in these queues: {QUEUES}");
|
d.put("commands.leave.not-queued", "&cYou are not queued for that server! &7You are in these queues: {QUEUES}");
|
||||||
|
d.put("commands.leave.no-queues", "&cYou are not queued!");
|
||||||
|
|
||||||
msgs = BungeeMessages.getInstance(this, d);
|
msgs = BungeeMessages.getInstance(this, d);
|
||||||
//msgs = BungeeMessages.getInstance(this);
|
//msgs = BungeeMessages.getInstance(this);
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ public class LeaveCommand extends Command {
|
|||||||
ProxiedPlayer p = (ProxiedPlayer) sender;
|
ProxiedPlayer p = (ProxiedPlayer) sender;
|
||||||
List<Server> servers = man.findPlayerInQueue(p);
|
List<Server> servers = man.findPlayerInQueue(p);
|
||||||
|
|
||||||
|
if(servers.size() == 0) {
|
||||||
|
p.sendMessage(msgs.getBC("commands.leave.no-queues"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(servers.size() == 1) {
|
if(servers.size() == 1) {
|
||||||
servers.get(0).getQueue().remove(p);
|
servers.get(0).getQueue().remove(p);
|
||||||
|
|||||||
Reference in New Issue
Block a user