SteamWar/BungeeCore
Archiviert
13
2

Implementing event mode for event bungee #142

Manuell gemergt
Lixfel hat 3 Commits von eventMode nach master 2020-10-30 21:53:40 +01:00 zusammengeführt
Nur Änderungen aus Commit 84c2c2f825 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -41,6 +41,15 @@ public class SubserverSystem {
private static final String SERVER_PATH = BACKBONE + "server/";
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).
*
@ -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){
//Generate missing parameters
int port = freePort(2500);
int port = freePort(firstArenaPort);
if(serverName == null)
serverName = modus.getDisplayName() + (port - 2500);
serverName = modus.getDisplayName() + (port - firstArenaPort);
if(mapName == null)
mapName = serverName;