From 01ea928652bc619f654087006593a3a4e6bd76f1 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Fri, 10 Jun 2022 19:30:15 +0200 Subject: [PATCH] 1.19 Build server Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/ServerStarter.java | 10 +++++----- src/de/steamwar/bungeecore/commands/BauCommand.java | 12 +++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/de/steamwar/bungeecore/ServerStarter.java b/src/de/steamwar/bungeecore/ServerStarter.java index 36ccac6..35a97dd 100644 --- a/src/de/steamwar/bungeecore/ServerStarter.java +++ b/src/de/steamwar/bungeecore/ServerStarter.java @@ -26,7 +26,7 @@ public class ServerStarter { private static final String EVENT_PATH = BACKBONE + "event/"; public static final String TEMP_WORLD_PATH = BACKBONE + "arenaserver/"; 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 String worldDir = null; @@ -109,10 +109,10 @@ public class ServerStarter { return this; } - public ServerStarter build18(UUID owner) { - directory = new File(SERVER_PATH, "Bau18"); - serverJar = "paper-1.18.2.jar"; - worldDir = WORLDS18_PATH; + public ServerStarter build19(UUID owner) { + directory = new File(SERVER_PATH, "Bau19"); + serverJar = "paper-1.19.jar"; + worldDir = WORLDS19_PATH; worldName = String.valueOf(SteamwarUser.get(owner).getId()); buildWithWorld(owner, new File(directory, "Bauwelt").getPath()); return this; diff --git a/src/de/steamwar/bungeecore/commands/BauCommand.java b/src/de/steamwar/bungeecore/commands/BauCommand.java index 4840915..ea21cd9 100644 --- a/src/de/steamwar/bungeecore/commands/BauCommand.java +++ b/src/de/steamwar/bungeecore/commands/BauCommand.java @@ -46,7 +46,7 @@ public class BauCommand extends BasicCommand { ProxiedPlayer p = (ProxiedPlayer) sender; 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().build12(p.getUniqueId()).send(p).start(), () -> { @@ -128,13 +128,13 @@ public class BauCommand extends BasicCommand { } 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().build12(worldOwner.getUuid()).send(p).start(), () -> 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) { int version = p.getPendingConnection().getVersion(); if(version > 340) { // Version > 1.12.2 @@ -146,9 +146,11 @@ public class BauCommand extends BasicCommand { } switch (args[pos].toLowerCase()) { + case "19": + case "1.19": case "18": case "1.18": - run18.run(); + run19.run(); break; case "ws": case "warship": @@ -231,7 +233,7 @@ public class BauCommand extends BasicCommand { private static void delete(ProxiedPlayer p, String[] args){ SteamwarUser user = SteamwarUser.get(p.getUniqueId()); 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.WORLD_FOLDER + p.getUniqueId().toString())), () -> HelpCommand.sendBauHelp(ChatSender.of(p)));