SteamWar/BungeeCore
Archiviert
13
2

1.19 Build server
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-06-10 19:30:15 +02:00
Ursprung 1ef5f9e625
Commit 01ea928652
2 geänderte Dateien mit 12 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -26,7 +26,7 @@ public class ServerStarter {
private static final String EVENT_PATH = BACKBONE + "event/"; private static final String EVENT_PATH = BACKBONE + "event/";
public static final String TEMP_WORLD_PATH = BACKBONE + "arenaserver/"; public static final String TEMP_WORLD_PATH = BACKBONE + "arenaserver/";
public static final String TUTORIAL_PATH = BACKBONE + "tutorials/"; public static final String TUTORIAL_PATH = BACKBONE + "tutorials/";
public static final String WORLDS18_PATH = BACKBONE + "userworlds18/"; public static final String WORLDS19_PATH = BACKBONE + "userworlds19/";
private File directory = null; private File directory = null;
private String worldDir = null; private String worldDir = null;
@ -109,10 +109,10 @@ public class ServerStarter {
return this; return this;
} }
public ServerStarter build18(UUID owner) { public ServerStarter build19(UUID owner) {
directory = new File(SERVER_PATH, "Bau18"); directory = new File(SERVER_PATH, "Bau19");
serverJar = "paper-1.18.2.jar"; serverJar = "paper-1.19.jar";
worldDir = WORLDS18_PATH; worldDir = WORLDS19_PATH;
worldName = String.valueOf(SteamwarUser.get(owner).getId()); worldName = String.valueOf(SteamwarUser.get(owner).getId());
buildWithWorld(owner, new File(directory, "Bauwelt").getPath()); buildWithWorld(owner, new File(directory, "Bauwelt").getPath());
return this; return this;

Datei anzeigen

@ -46,7 +46,7 @@ public class BauCommand extends BasicCommand {
ProxiedPlayer p = (ProxiedPlayer) sender; ProxiedPlayer p = (ProxiedPlayer) sender;
versionSelector(p, args, 0, versionSelector(p, args, 0,
() -> new ServerStarter().build18(p.getUniqueId()).send(p).start(), () -> new ServerStarter().build19(p.getUniqueId()).send(p).start(),
() -> new ServerStarter().build15(p.getUniqueId()).send(p).start(), () -> new ServerStarter().build15(p.getUniqueId()).send(p).start(),
() -> new ServerStarter().build12(p.getUniqueId()).send(p).start(), () -> new ServerStarter().build12(p.getUniqueId()).send(p).start(),
() -> { () -> {
@ -128,13 +128,13 @@ public class BauCommand extends BasicCommand {
} }
versionSelector(p, args, 2, versionSelector(p, args, 2,
() -> new ServerStarter().build18(worldOwner.getUuid()).send(p).start(), () -> new ServerStarter().build19(worldOwner.getUuid()).send(p).start(),
() -> new ServerStarter().build15(worldOwner.getUuid()).send(p).start(), () -> new ServerStarter().build15(worldOwner.getUuid()).send(p).start(),
() -> new ServerStarter().build12(worldOwner.getUuid()).send(p).start(), () -> new ServerStarter().build12(worldOwner.getUuid()).send(p).start(),
() -> HelpCommand.sendBauHelp(ChatSender.of(p))); () -> HelpCommand.sendBauHelp(ChatSender.of(p)));
} }
private static void versionSelector(ProxiedPlayer p, String[] args, int pos, Runnable run18, Runnable run15, Runnable run12, Runnable runElse) { private static void versionSelector(ProxiedPlayer p, String[] args, int pos, Runnable run19, Runnable run15, Runnable run12, Runnable runElse) {
if(args.length <= pos) { if(args.length <= pos) {
int version = p.getPendingConnection().getVersion(); int version = p.getPendingConnection().getVersion();
if(version > 340) { // Version > 1.12.2 if(version > 340) { // Version > 1.12.2
@ -146,9 +146,11 @@ public class BauCommand extends BasicCommand {
} }
switch (args[pos].toLowerCase()) { switch (args[pos].toLowerCase()) {
case "19":
case "1.19":
case "18": case "18":
case "1.18": case "1.18":
run18.run(); run19.run();
break; break;
case "ws": case "ws":
case "warship": case "warship":
@ -231,7 +233,7 @@ public class BauCommand extends BasicCommand {
private static void delete(ProxiedPlayer p, String[] args){ private static void delete(ProxiedPlayer p, String[] args){
SteamwarUser user = SteamwarUser.get(p.getUniqueId()); SteamwarUser user = SteamwarUser.get(p.getUniqueId());
versionSelector(p, args, 1, versionSelector(p, args, 1,
() -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS18_PATH + user.getId())), () -> deleteConfirmation(p, () -> deleteWorld(p, ServerStarter.WORLDS19_PATH + user.getId())),
() -> deleteConfirmation(p, () -> deleteWorld(p, BungeeCore.USERWORLDS15 + user.getId())), () -> deleteConfirmation(p, () -> deleteWorld(p, BungeeCore.USERWORLDS15 + user.getId())),
() -> deleteConfirmation(p, () -> deleteWorld(p, BungeeCore.WORLD_FOLDER + p.getUniqueId().toString())), () -> deleteConfirmation(p, () -> deleteWorld(p, BungeeCore.WORLD_FOLDER + p.getUniqueId().toString())),
() -> HelpCommand.sendBauHelp(ChatSender.of(p))); () -> HelpCommand.sendBauHelp(ChatSender.of(p)));