fixed server-side ConcurrentModificationException

This commit is contained in:
LAX1DUDE 2022-08-20 17:25:03 -07:00
parent e4afd4dc90
commit c9a8a59f8d
3 changed files with 12778 additions and 12774 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -29,8 +29,10 @@ public class WorkerListenThread {
*/
public void addPlayer(NetHandler par1NetServerHandler) {
System.out.println("[Server][ADDPLAYER][" + par1NetServerHandler.getClass().getSimpleName() + "]");
synchronized(this.connections) {
this.connections.add(par1NetServerHandler);
}
}
public void stopListening() {
this.isListening = false;
@ -79,6 +81,7 @@ public class WorkerListenThread {
* Handles all incoming connections and packets
*/
public void handleNetworkListenThread() {
synchronized(this.connections) {
deleteDeadConnections();
@ -89,6 +92,7 @@ public class WorkerListenThread {
deleteDeadConnections();
}
}
public MinecraftServer getServer() {
return this.mcServer;