Archiviert
1
0
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2020-10-30 15:16:34 +01:00
Ursprung f39b7787d9
Commit 84c2c2f825

Datei anzeigen

@ -41,6 +41,15 @@ public class SubserverSystem {
private static final String SERVER_PATH = BACKBONE + "server/"; private static final String SERVER_PATH = BACKBONE + "server/";
private static final String EVENT_PATH = BACKBONE + "event/"; private static final String EVENT_PATH = BACKBONE + "event/";
private static final int firstArenaPort;
static {
if(BungeeCore.EVENT_MODE)
firstArenaPort = 6000;
else
firstArenaPort = 2500;
}
/** /**
* This function starts every arena (even test- and eventarenas). * This function starts every arena (even test- and eventarenas).
* *
@ -80,10 +89,10 @@ public class SubserverSystem {
*/ */
public static Subserver startArena(ArenaMode modus, String map, int eventFightID, int checkSchemID, String serverName, String mapName, UUID player1, UUID player2, boolean ranked){ public static Subserver startArena(ArenaMode modus, String map, int eventFightID, int checkSchemID, String serverName, String mapName, UUID player1, UUID player2, boolean ranked){
//Generate missing parameters //Generate missing parameters
int port = freePort(2500); int port = freePort(firstArenaPort);
if(serverName == null) if(serverName == null)
serverName = modus.getDisplayName() + (port - 2500); serverName = modus.getDisplayName() + (port - firstArenaPort);
if(mapName == null) if(mapName == null)
mapName = serverName; mapName = serverName;