Move old user conversion down slightly (fixes #8050) (#8052)

This commit is contained in:
Noah van der Aa 2022-07-12 23:13:27 +02:00
parent 820aef3f3c
commit 952ccf3125
2 changed files with 9 additions and 9 deletions

View File

@ -211,8 +211,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) { if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\""); DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
paperConfigurations.initializeGlobalConfiguration(); this.getPlayerList().loadAndSaveFiles(); // Must be after convertNames
paperConfigurations.initializeWorldDefaultsConfiguration(); // Paper end - moved up
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash);
+ thread.start(); // Paper - start console thread after MinecraftServer.console & PaperConfig are initialized + thread.start(); // Paper - start console thread after MinecraftServer.console & PaperConfig are initialized
io.papermc.paper.command.PaperCommands.registerCommands(this); io.papermc.paper.command.PaperCommands.registerCommands(this);

View File

@ -25,18 +25,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
org.spigotmc.SpigotConfig.init((java.io.File) options.valueOf("spigot-settings")); io.papermc.paper.util.ObfHelper.INSTANCE.getClass(); // Paper - load mappings for stacktrace deobf and etc.
org.spigotmc.SpigotConfig.registerCommands(); paperConfigurations.initializeGlobalConfiguration();
// Spigot end paperConfigurations.initializeWorldDefaultsConfiguration();
+ // Paper start - moved up to right after PlayerList creation but before file load/save + // Paper start - moved up to right after PlayerList creation but before file load/save
+ if (this.convertOldUsers()) { + if (this.convertOldUsers()) {
+ this.getProfileCache().save(false); // Paper + this.getProfileCache().save(false); // Paper
+ } + }
+ this.getPlayerList().loadAndSaveFiles(); // Must be after convertNames + this.getPlayerList().loadAndSaveFiles(); // Must be after convertNames
+ // Paper end + // Paper end - moved up
// Paper start org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash);
io.papermc.paper.util.ObfHelper.INSTANCE.getClass(); // Paper - load mappings for stacktrace deobf and etc. io.papermc.paper.command.PaperCommands.registerCommands(this);
paperConfigurations.initializeGlobalConfiguration(); com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file."); DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
} }