geforkt von Mirrors/Paper
b8edb0e130
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 6b34da8f SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender CraftBukkit Changes: db4ba2897 SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender 4f7ff4dec PR-1246: Add missing AbstractTestingBase to tests which need them f70a7b68d SPIGOT-7465, MC-264979: Fresh installations print NoSuchFileException for server.properties 8ef7afef6 PR-1240: Call BlockGrowEvent for vines that are growing on additional sides of an existing vine block Spigot Changes: d2eba2c8 Rebuild patches
62 Zeilen
3.5 KiB
Diff
62 Zeilen
3.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Mon, 4 Jan 2021 19:49:15 -0800
|
|
Subject: [PATCH] fix converting txt to json file
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java b/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
|
index a20d47f54f12dfc0a5f76dd969238e34c958b618..935dac757280731bfeb0a8f033cbe315ecac46da 100644
|
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
|
@@ -18,6 +18,11 @@ public class DedicatedPlayerList extends PlayerList {
|
|
this.setViewDistance(dedicatedServerProperties.viewDistance);
|
|
this.setSimulationDistance(dedicatedServerProperties.simulationDistance);
|
|
super.setUsingWhiteList(dedicatedServerProperties.whiteList.get());
|
|
+ // Paper start - moved from constructor
|
|
+ }
|
|
+ @Override
|
|
+ public void loadAndSaveFiles() {
|
|
+ // Paper end
|
|
this.loadUserBanList();
|
|
this.saveUserBanList();
|
|
this.loadIpBanList();
|
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
index 8f7916aa522fa2a49197d59e63d6e5c3a2d4bf42..89b6cbc3721cdd8000ae34c33dec1d4458cf55d3 100644
|
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
|
@@ -198,6 +198,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
|
io.papermc.paper.util.ObfHelper.INSTANCE.getClass(); // Paper - load mappings for stacktrace deobf and etc.
|
|
paperConfigurations.initializeGlobalConfiguration();
|
|
paperConfigurations.initializeWorldDefaultsConfiguration();
|
|
+ // Paper start - moved up to right after PlayerList creation but before file load/save
|
|
+ if (this.convertOldUsers()) {
|
|
+ this.getProfileCache().save(false); // Paper
|
|
+ }
|
|
+ this.getPlayerList().loadAndSaveFiles(); // Must be after convertNames
|
|
+ // Paper end - moved up
|
|
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash);
|
|
io.papermc.paper.command.PaperCommands.registerCommands(this);
|
|
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
|
|
@@ -253,9 +259,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
|
DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
|
|
}
|
|
|
|
- if (this.convertOldUsers()) {
|
|
- this.getProfileCache().save(false); // Paper
|
|
- }
|
|
|
|
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
|
|
return false;
|
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
index 600bb44d97b477960108ea8cd84a8e734b7e10d0..6d333b75f898fc34c7e739a1246a202329f1b9ff 100644
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
@@ -186,6 +186,7 @@ public abstract class PlayerList {
|
|
this.maxPlayers = maxPlayers;
|
|
this.playerIo = saveHandler;
|
|
}
|
|
+ abstract public void loadAndSaveFiles(); // Paper - moved from DedicatedPlayerList constructor
|
|
|
|
public void placeNewPlayer(Connection connection, ServerPlayer player) {
|
|
player.isRealPlayer = true; // Paper
|