Archiviert
1
0

Fix folder inconsistencies

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-08-22 16:07:21 +02:00
Ursprung e4cd94aecd
Commit ea94195db8
3 geänderte Dateien mit 9 neuen und 15 gelöschten Zeilen

Datei anzeigen

@ -61,11 +61,7 @@ public class BungeeCore extends Plugin {
public static boolean MAIN_SERVER;
public static String CHAT_PREFIX;
public static String WORLD_FOLDER;
public static String BAUWELT_PROTOTYP;
public static String LOBBY_SERVER;
public static String USERWORLDS15;
public static String BAUWELT15;
public static boolean EVENT_MODE;
private static BungeeCore instance;
@ -299,11 +295,7 @@ public class BungeeCore extends Plugin {
}
CHAT_PREFIX = config.getString("prefix");
WORLD_FOLDER = config.getString("worldfolder");
BAUWELT_PROTOTYP = config.getString("bauweltprototyp");
LOBBY_SERVER = config.getString("lobbyserver");
USERWORLDS15 = config.getString("userworlds15");
BAUWELT15 = config.getString("bauwelt15");
EVENT_MODE = config.getBoolean("eventmode");
Broadcaster.setBroadCastMsgs(config.getStringList("broadcasts").toArray(new String[1]));
PollSystem.init(config.getString("poll.question"), config.getStringList("poll.answers"));

Datei anzeigen

@ -24,6 +24,8 @@ public class ServerStarter {
private static final String EVENT_PATH = USER_HOME + "event/";
public static final String TEMP_WORLD_PATH = USER_HOME + "arenaserver/";
public static final String TUTORIAL_PATH = USER_HOME + "tutorials/";
public static final String WORLDS12_PATH = USER_HOME + "userworlds/";
public static final String WORLDS15_PATH = USER_HOME + "userworlds15/";
public static final String WORLDS19_PATH = USER_HOME + "userworlds19/";
private File directory = null;
@ -118,19 +120,19 @@ public class ServerStarter {
public ServerStarter build15(UUID owner) {
directory = new File(SERVER_PATH, "Bau15");
worldDir = BungeeCore.USERWORLDS15;
worldDir = WORLDS15_PATH;
worldName = String.valueOf(SteamwarUser.get(owner).getId());
buildWithWorld(owner, BungeeCore.BAUWELT15);
buildWithWorld(owner, new File(directory, "Bauwelt").getPath());
return this;
}
public ServerStarter build12(UUID owner) {
directory = new File(SERVER_PATH, "UserBau");
directory = new File(SERVER_PATH, "Bau12");
serverJar = "spigot-1.12.2.jar";
xmx = "256M";
worldDir = BungeeCore.WORLD_FOLDER;
worldDir = WORLDS12_PATH;
worldName = owner.toString();
buildWithWorld(owner, BungeeCore.BAUWELT_PROTOTYP);
buildWithWorld(owner, new File(directory, "Bauwelt").getPath());
return this;
}

Datei anzeigen

@ -236,8 +236,8 @@ public class BauCommand extends BasicCommand {
SteamwarUser user = SteamwarUser.get(p.getUniqueId());
versionSelector(p, args, 1,
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS19_PATH + user.getId())),
() -> deleteConfirmation(p, () -> deleteWorld(p, BungeeCore.USERWORLDS15 + user.getId())),
() -> deleteConfirmation(p, () -> deleteWorld(p, BungeeCore.WORLD_FOLDER + p.getUniqueId().toString())),
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS15_PATH + user.getId())),
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS12_PATH + p.getUniqueId().toString())),
() -> HelpCommand.sendBauHelp(ChatSender.of(p)));
}