geforkt von Mirrors/Paper
aa52bf9e33
Mojang made some changes to priorities in 1.17 and it seems that these changes conflict with the changes made in this patch, which in some cases appears to cause excessive rescheduling of tasks. This, however, is not confirmed as such but seems to be the behavior that we're seeing to cause this issue, if mojang has adopted the changes we suggested, then a good chunk of this patch may be unneeded, but, this needs a much better look than I'm currently able to do
34 Zeilen
2.2 KiB
Diff
34 Zeilen
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
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 7ce854edba32ffcafaa5268d4bb2822a5233e40b..3d6e09a3f028e50c08cbbb6b426f5b044c7b9e67 100644
|
|
--- a/src/main/java/net/minecraft/server/Main.java
|
|
+++ b/src/main/java/net/minecraft/server/Main.java
|
|
@@ -129,11 +129,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); // Paper
|
|
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
|
|
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
|
|
- GameProfileCache usercache = new GameProfileCache(gameprofilerepository, new File(file, MinecraftServer.USERID_CACHE_FILE.getName()));
|
|
+ GameProfileCache usercache = new GameProfileCache(gameprofilerepository, userCacheFile); // Paper - only move usercache.json into folder if --universe is used, not world-container
|
|
// CraftBukkit start
|
|
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
|
|
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
|