From 5424a739d9d02eec74d4e03d53c267d5e47d5a1d Mon Sep 17 00:00:00 2001 From: Lixfel Date: Tue, 30 Mar 2021 19:12:00 +0200 Subject: [PATCH] Adjust config for new fight system Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/ArenaMode.java | 8 ++------ src/de/steamwar/bungeecore/SubserverSystem.java | 4 ++-- src/de/steamwar/bungeecore/commands/FightCommand.java | 2 +- src/de/steamwar/bungeecore/commands/RankedCommand.java | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/de/steamwar/bungeecore/ArenaMode.java b/src/de/steamwar/bungeecore/ArenaMode.java index 19652ab5..68a27a4e 100644 --- a/src/de/steamwar/bungeecore/ArenaMode.java +++ b/src/de/steamwar/bungeecore/ArenaMode.java @@ -107,10 +107,6 @@ public class ArenaMode { byCheckSchemType.put(this.schemType, this); } - public String getInternalName() { - return internalName; - } - public String getDisplayName() { return displayName; } @@ -143,8 +139,8 @@ public class ArenaMode { return chatNames.get(0); } - public boolean hasChatName(){ - return !chatNames.isEmpty(); + public boolean withoutChatName(){ + return chatNames.isEmpty(); } public boolean isHistoric(){ diff --git a/src/de/steamwar/bungeecore/SubserverSystem.java b/src/de/steamwar/bungeecore/SubserverSystem.java index 3613febd..5751f6ef 100644 --- a/src/de/steamwar/bungeecore/SubserverSystem.java +++ b/src/de/steamwar/bungeecore/SubserverSystem.java @@ -108,7 +108,7 @@ public class SubserverSystem { //Copy world try { - new ProcessBuilder("cp", "-r", SERVER_PATH + modus.getFolder() + "/" + map, worldDir + mapName).start().waitFor(); + new ProcessBuilder("cp", "-r", SERVER_PATH + modus.getFolder() + "/arenas/" + map, worldDir + mapName).start().waitFor(); } catch (IOException | InterruptedException e) { throw new SecurityException("Could not copy folder", e); } @@ -128,7 +128,7 @@ public class SubserverSystem { //Start server ProcessBuilder process = new ProcessBuilder(cmd); - process.directory(new File(SERVER_PATH, modus.getInternalName())); + process.directory(new File(SERVER_PATH, modus.getFolder())); String finalMapName = mapName; if(eventFightID == -1) diff --git a/src/de/steamwar/bungeecore/commands/FightCommand.java b/src/de/steamwar/bungeecore/commands/FightCommand.java index 44e9cf10..93292de3 100644 --- a/src/de/steamwar/bungeecore/commands/FightCommand.java +++ b/src/de/steamwar/bungeecore/commands/FightCommand.java @@ -69,7 +69,7 @@ public class FightCommand extends BasicCommand { TextComponent start = new TextComponent(); TextComponent current = start; for(ArenaMode mode : ArenaMode.getAllModes()){ - if(!mode.hasChatName() || mode.isHistoric() != historic) + if(mode.withoutChatName() || mode.isHistoric() != historic) continue; String command = precommand + mode.getChatName(); current.setBold(true); diff --git a/src/de/steamwar/bungeecore/commands/RankedCommand.java b/src/de/steamwar/bungeecore/commands/RankedCommand.java index c70fff93..5825b48f 100644 --- a/src/de/steamwar/bungeecore/commands/RankedCommand.java +++ b/src/de/steamwar/bungeecore/commands/RankedCommand.java @@ -81,7 +81,7 @@ public class RankedCommand extends BasicCommand { TextComponent start = new TextComponent(); TextComponent current = start; for(ArenaMode mode : ArenaMode.getAllModes()){ - if(!mode.hasChatName() || !mode.isRanked()) + if(mode.withoutChatName() || !mode.isRanked()) continue; String command = precommand + mode.getChatName(); current.setBold(true);