a bunch of stuff im too lazy to go through (1.3.4)
This commit is contained in:
@@ -122,7 +122,7 @@ public class Manager {
|
||||
continue;
|
||||
}
|
||||
int len = plys.size();
|
||||
if(!s.isOnline()) {
|
||||
if(!s.isOnline() || s.isFull()) {
|
||||
String or = msgs.get("status.offline.restarting");
|
||||
if(ot > pl.config.getInt("offline-time")) {
|
||||
or = msgs.get("status.offline.offline");
|
||||
@@ -169,11 +169,14 @@ public class Manager {
|
||||
continue;
|
||||
}
|
||||
int len = plys.size();
|
||||
if(!s.isOnline()) {
|
||||
if(!s.isOnline() || s.isFull()) {
|
||||
String or = msgs.get("status.offline.restarting");
|
||||
if(ot > pl.config.getInt("offline-time")) {
|
||||
or = msgs.get("status.offline.offline");
|
||||
}
|
||||
if(s.isFull() && s.isOnline()) {
|
||||
or = msgs.get("status.offline.full");
|
||||
}
|
||||
ply.sendMessage(Main.formatMessage(
|
||||
msgs.get("status.offline.base")
|
||||
.replaceAll("\\{STATUS\\}", or)
|
||||
@@ -246,7 +249,17 @@ public class Manager {
|
||||
if(!s.isOnline()) continue;
|
||||
if(s.getQueue().size() <= 0) continue;
|
||||
|
||||
s.getQueue().get(0).connect(s.getInfo());
|
||||
ProxiedPlayer nextplayer = s.getQueue().get(0);
|
||||
|
||||
while(nextplayer.getServer().getInfo().getName().equals(s.getName())) {
|
||||
s.getQueue().remove(nextplayer);
|
||||
if(s.getQueue().size() <= 0) break;
|
||||
nextplayer = s.getQueue().get(0);
|
||||
}
|
||||
if(s.getQueue().size() <= 0) continue;
|
||||
if(s.isFull() && !nextplayer.hasPermission("ajqueue.joinfull")) continue;
|
||||
|
||||
nextplayer.connect(s.getInfo());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,6 +275,11 @@ public class Manager {
|
||||
return;
|
||||
}
|
||||
|
||||
if(p.getServer().getInfo().getName().equals(s)) {
|
||||
p.sendMessage(msgs.getBC("errors.already-connected"));
|
||||
return;
|
||||
}
|
||||
|
||||
Server beforeQueue = findPlayerInQueue(p);
|
||||
if(beforeQueue != null) {
|
||||
if(beforeQueue.equals(server)) {
|
||||
|
||||
Reference in New Issue
Block a user