geforkt von SteamWar/BungeeCore
Disabling labymod spam + synchronising port search
Dieser Commit ist enthalten in:
Ursprung
afc74d6a34
Commit
d1f2a195f3
@ -85,18 +85,20 @@ public class SubserverSystem {
|
||||
}
|
||||
|
||||
private static int freePort(int start){
|
||||
int port = start;
|
||||
boolean isFree = false;
|
||||
while(!isFree){
|
||||
port++;
|
||||
isFree = true;
|
||||
for(Subserver server : Subserver.getServerList()){
|
||||
if(server.getServer().getAddress().getPort() == port){
|
||||
isFree = false;
|
||||
break;
|
||||
synchronized (Subserver.getServerList()){
|
||||
int port = start;
|
||||
boolean isFree = false;
|
||||
while(!isFree){
|
||||
port++;
|
||||
isFree = true;
|
||||
for(Subserver server : Subserver.getServerList()){
|
||||
if(server.getServer().getAddress().getPort() == port){
|
||||
isFree = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return port;
|
||||
}
|
||||
return port;
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,6 @@ public class LabyMod extends BasicListener {
|
||||
return;
|
||||
|
||||
Pair<Integer, String> value = readString(data, purpose.getKey());
|
||||
BungeeCore.log(value.getValue());
|
||||
List<Mod> mods = new LinkedList<>();
|
||||
|
||||
try{
|
||||
@ -56,7 +55,6 @@ public class LabyMod extends BasicListener {
|
||||
}
|
||||
|
||||
Utils.handleMods(player, mods);
|
||||
//TODO CCP & SHADOW
|
||||
}
|
||||
|
||||
private Pair<Integer, String> readString(byte[] array, int startPos){
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren