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