From 549cb62df5065b4e3617633d5b2b062c925a9279 Mon Sep 17 00:00:00 2001 From: Keuin Date: Tue, 4 Jan 2022 19:09:33 +0800 Subject: Make it compile for Minecraft 1.18. --- src/main/java/com/keuin/kbackupfabric/ui/KBCommands.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/keuin/kbackupfabric/ui/KBCommands.java') diff --git a/src/main/java/com/keuin/kbackupfabric/ui/KBCommands.java b/src/main/java/com/keuin/kbackupfabric/ui/KBCommands.java index e148f24..784cd65 100644 --- a/src/main/java/com/keuin/kbackupfabric/ui/KBCommands.java +++ b/src/main/java/com/keuin/kbackupfabric/ui/KBCommands.java @@ -255,7 +255,7 @@ public final class KBCommands { public static int delete(CommandContext context) { String backupFileName = parseBackupFileName(context, StringArgumentType.getString(context, "backupName")); - MinecraftServer server = context.getSource().getMinecraftServer(); + MinecraftServer server = context.getSource().getServer(); if (backupFileName == null) return list(context); // Show the list and return @@ -286,7 +286,7 @@ public final class KBCommands { public static int restore(CommandContext context) { try { //KBMain.restore("name") - MinecraftServer server = context.getSource().getMinecraftServer(); + MinecraftServer server = context.getSource().getServer(); String backupFileName = parseBackupFileName(context, StringArgumentType.getString(context, "backupName")); // backupFileName = parseBackupFileName(context, backupFileName); @@ -344,7 +344,7 @@ public final class KBCommands { PrintUtil.info("Start backup..."); // configure backup method - MinecraftServer server = context.getSource().getMinecraftServer(); + MinecraftServer server = context.getSource().getServer(); ConfiguredBackupMethod method = !incremental ? new ConfiguredPrimitiveBackupMethod( PrimitiveBackupFileNameEncoder.INSTANCE.encode(customBackupName, LocalDateTime.now()), getLevelPath(server), -- cgit v1.2.3