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
2 geänderte Dateien mit 8 neuen und 5 gelöschten Zeilen
Nur Änderungen aus Commit a74af339aa werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -91,8 +91,12 @@ public class SubserverSystem {
//Generate missing parameters
int port = freePort(firstArenaPort);
if(serverName == null)
serverName = modus.getDisplayName() + (port - firstArenaPort);
if(serverName == null){
if(ranked)
serverName = "Ranked" + (port - firstArenaPort);
else
serverName = modus.getDisplayName() + (port - firstArenaPort);
}
if(mapName == null)
mapName = serverName;

Datei anzeigen

@ -165,12 +165,11 @@ public class RankedCommand extends BasicCommand {
removeFromAll(wp1.player);
removeFromAll(wp2.player);
String serverName = wp1.player.getName() + " vs " + wp2.player.getName();
Subserver arena = SubserverSystem.startArena(mode, mode.getRandomMap(), 0, 0, serverName, serverName.replace(' ', '_'), wp1.player.getUniqueId(), wp2.player.getUniqueId(), true);
Subserver arena = SubserverSystem.startArena(mode, mode.getRandomMap(), 0, 0, null, null, wp1.player.getUniqueId(), wp2.player.getUniqueId(), true);
arena.sendPlayer(wp1.player);
arena.sendPlayer(wp2.player);
BungeeCore.broadcast(BungeeCore.CHAT_PREFIX + "§7" + mode.getDisplayName() + "§8-§7Ranglistenspiel§8: §e" + serverName,
BungeeCore.broadcast(BungeeCore.CHAT_PREFIX + "§7" + mode.getDisplayName() + "§8-§7Ranglistenspiel§8: §e" + wp1.player.getName() + " vs " + wp2.player.getName(),
"§aZuschauen",
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + wp1.player.getName()));
}