Archiviert
1
0

Merge pull request 'Remove ranked flag' (#304) from Ranked into master

Reviewed-on: SteamWar/BungeeCore#304
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Lixfel 2022-03-10 11:55:16 +01:00
Commit 203dcdb5dd
5 geänderte Dateien mit 9 neuen und 16 gelöschten Zeilen

Datei anzeigen

@ -77,21 +77,15 @@ public class SubserverSystem {
* For event, test and normal arenas: The UUID of the designated leader for the red team
* or null (no designated leader).
*
* @param ranked
* If the game is a ranked game.
*
* @return
* The new started subserver.
*/
public static synchronized Subserver startArena(ArenaMode modus, String map, int eventFightID, int checkSchemID, int prepareSchemID, int replayID, 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, int replayID, String serverName, String mapName, UUID player1, UUID player2){
//Generate missing parameters
Node node = eventFightID > 0 ? Node.local : Node.getNode();
int port = arenaPorts.freePort();
if(serverName == null){
if(ranked)
serverName = "Ranked" + (port - arenaPorts.start);
else
serverName = modus.getDisplayName() + (port - arenaPorts.start);
}
if(mapName == null)
@ -112,7 +106,7 @@ public class SubserverSystem {
ProcessBuilder builder = node.startServer(
modus.serverJar(), directory, worldDir, mapName, port, "768M",
"logPath=" + mapName, "config=" + modus.getConfig(),
"fightID=" + eventFightID, "ranked=" + ranked,
"fightID=" + eventFightID,
"checkSchemID=" + checkSchemID, "prepareSchemID=" + prepareSchemID,
"replay=" + replayID,
player1 != null && eventFightID != -1 ? "blueLeader=" + player1 : null,
@ -144,12 +138,11 @@ public class SubserverSystem {
0, serverName,
serverName + eventFight.getStartTime().toLocalDateTime().format(DateTimeFormatter.ISO_TIME),
null,
null,
false);
null);
}
public static void startTestServer(ProxiedPlayer p, ArenaMode m, String map, int checkSchemId, int prepareSchemId){
startArena(m, map, -1, checkSchemId, prepareSchemId, 0, p.getName() + "s Bau", p.getName(), p.getUniqueId(), null, false).sendPlayer(p);
startArena(m, map, -1, checkSchemId, prepareSchemId, 0, p.getName() + "s Bau", p.getName(), p.getUniqueId(), null).sendPlayer(p);
}
private static synchronized void sendToBau(ProxiedPlayer p, UUID owner, String prototype, String worldFolder, String serverJar, String worldDir, String worldName, String xmx, String serverName){

Datei anzeigen

@ -76,7 +76,7 @@ public class ChallengeCommand extends BasicCommand {
challenges.remove(target);
challenges.remove(player);
Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, 0, 0, null, null, player.getUniqueId(), target.getUniqueId(), false);
Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, 0, 0, null, null, player.getUniqueId(), target.getUniqueId());
arena.sendPlayer(player);
arena.sendPlayer(target);

Datei anzeigen

@ -164,7 +164,7 @@ public class FightCommand extends BasicCommand {
@Override
public void execute(CommandSender sender, String[] args) {
createArena(sender, "/fight ", args, 0, false, (player, mode, map) -> {
Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, 0, 0, null, null, player.getUniqueId(), null, false);
Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, 0, 0, null, null, player.getUniqueId(), null);
arena.sendPlayer(player);
Message.broadcast("FIGHT_BROADCAST", "FIGHT_BROADCAST_HOVER"
, new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/arena " + arena.getServer().getName()), mode.getDisplayName(), player.getName());

Datei anzeigen

@ -36,7 +36,7 @@ public class HistoricCommand extends BasicCommand {
@Override
public void execute(CommandSender sender, String[] args) {
FightCommand.createArena(sender, "/historic ", args, 0, true, (player, mode, map) -> {
Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, 0, 0, null, null, player.getUniqueId(), null, false);
Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, 0, 0, null, null, player.getUniqueId(), null);
arena.sendPlayer(player);
Message.broadcast("HISTORIC_BROADCAST", "HISTORIC_BROADCAST_HOVER"
, new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/arena " + arena.getServer().getName()), mode.getDisplayName(), player.getName());

Datei anzeigen

@ -35,7 +35,7 @@ public class ReplayCommand extends BasicCommand {
}
ArenaMode mode = fight.getGameMode();
SubserverSystem.startArena(mode, mode.getRandomMap(), 0, 0, 0, fight.getFightID(), null, null, null, null, false).sendPlayer(player);
SubserverSystem.startArena(mode, mode.getRandomMap(), 0, 0, 0, fight.getFightID(), null, null, null, null).sendPlayer(player);
}, page -> Fight.getPage(page, 45).stream().map(fight -> new SWListInv.SWListEntry<>(getFightItem(player, fight), fight)).collect(Collectors.toList())).open();
}