SteamWar/BungeeCore
Archiviert
13
2

Merge pull request 'Fix SubserverSystem concurrency and Thread safety' (#221) from FixConcurrency into master

Reviewed-on: #221
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Lixfel 2021-06-26 07:34:18 +02:00
Commit deabc7d68d

Datei anzeigen

@ -89,7 +89,7 @@ public class SubserverSystem {
* @return * @return
* The new started subserver. * The new started subserver.
*/ */
public static Subserver startArena(ArenaMode modus, String map, int eventFightID, int checkSchemID, int prepareSchemID, String serverName, String mapName, UUID player1, UUID player2, boolean ranked){ public static synchronized Subserver startArena(ArenaMode modus, String map, int eventFightID, int checkSchemID, int prepareSchemID, String serverName, String mapName, UUID player1, UUID player2, boolean ranked){
//Generate missing parameters //Generate missing parameters
int port = freePort(FIRST_ARENA_PORT); int port = freePort(FIRST_ARENA_PORT);
@ -179,7 +179,7 @@ public class SubserverSystem {
startArena(m, map, -1, checkSchemId, prepareSchemId, p.getName() + "s Bau", p.getName(), p.getUniqueId(), null, false).sendPlayer(p); startArena(m, map, -1, checkSchemId, prepareSchemId, p.getName() + "s Bau", p.getName(), p.getUniqueId(), null, false).sendPlayer(p);
} }
private static void sendToBau(ProxiedPlayer p, UUID owner, String prototype, String worldFolder, String serverJar, String worldDir, String worldName, String xmx, String serverName){ private static synchronized void sendToBau(ProxiedPlayer p, UUID owner, String prototype, String worldFolder, String serverJar, String worldDir, String worldName, String xmx, String serverName){
if(bauRunning(p, owner)) if(bauRunning(p, owner))
return; return;