will say that the player is not queued instead of sending an empty list

This commit is contained in:
ajgeiss0702
2020-07-06 09:31:55 -07:00
parent d52248a773
commit 9ad79b25ee
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -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.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.no-queues", "&cYou are not queued!");
msgs = BungeeMessages.getInstance(this, d);
//msgs = BungeeMessages.getInstance(this);
@@ -29,6 +29,10 @@ public class LeaveCommand extends Command {
ProxiedPlayer p = (ProxiedPlayer) sender;
List<Server> servers = man.findPlayerInQueue(p);
if(servers.size() == 0) {
p.sendMessage(msgs.getBC("commands.leave.no-queues"));
return;
}
if(servers.size() == 1) {
servers.get(0).getQueue().remove(p);