diff options
author | William Blake Galbreath <[email protected]> | 2020-07-10 13:22:47 -0500 |
---|---|---|
committer | Aikar <[email protected]> | 2020-07-22 01:29:20 -0400 |
commit | 9b93d122ecdfc797de63a37152cffde8d55687cb (patch) | |
tree | d42a0c040546fdfb5fc8c48209d41f73325cb07a | |
parent | bede4d304d67f61e81975192883672239fa20ac9 (diff) | |
download | Paper-9b93d122ecdfc797de63a37152cffde8d55687cb.tar.gz Paper-9b93d122ecdfc797de63a37152cffde8d55687cb.zip |
Fix SPIGOT-5824 Bukkit world-container is not used
-rw-r--r-- | Spigot-Server-Patches/0546-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0546-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch b/Spigot-Server-Patches/0546-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch new file mode 100644 index 0000000000..a89982dd56 --- /dev/null +++ b/Spigot-Server-Patches/0546-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: William Blake Galbreath <[email protected]> +Date: Fri, 10 Jul 2020 13:12:33 -0500 +Subject: [PATCH] Fix SPIGOT-5824 Bukkit world-container is not used + + +diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java +index 79ac93c5f2cad09a5dd0450b55c709415d5fb3e6..fcd735098f3f818e68d2d80dab679e8789573e6b 100644 +--- a/src/main/java/net/minecraft/server/Main.java ++++ b/src/main/java/net/minecraft/server/Main.java +@@ -92,11 +92,20 @@ public class Main { + return; + } + +- File file = (File) optionset.valueOf("universe"); // CraftBukkit ++ // Paper start - fix SPIGOT-5824 ++ File file; ++ File userCacheFile = new File("usercache.json"); ++ if (optionset.has("universe")) { ++ file = (File) optionset.valueOf("universe"); // CraftBukkit ++ userCacheFile = new File(file, "usercache.json"); ++ } else { ++ file = new File(bukkitConfiguration.getString("settings.world-container", ".")); ++ } ++ // Paper end - fix SPIGOT-5824 + YggdrasilAuthenticationService yggdrasilauthenticationservice = new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY, UUID.randomUUID().toString()); // Paper + MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService(); + GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository(); +- UserCache usercache = new UserCache(gameprofilerepository, new File(file, MinecraftServer.b.getName())); ++ UserCache usercache = new UserCache(gameprofilerepository, userCacheFile); // Paper - only move usercache.json into folder if --universe is used, not world-container + // CraftBukkit start + String s = (String) Optional.ofNullable(optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName); + Convertable convertable = Convertable.a(file.toPath()); |