Fix PlayerProfile BukkitObject serialization, deprecate setName and setId for removal (#7471)

Having a modifiable hash here is a bit flawed and most developers should never need these methods
This commit is contained in:
Nassim Jahnke 2022-02-12 19:29:41 +01:00 committed by GitHub
parent 9567753460
commit 92c777d393
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 177 additions and 83 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Implement Keyed on World
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index d3c98840ca493259417ab435f8cc70c7e181648d..b404fb1642fa4480f87ad675418c57c84944b3a2 100644
index e116d734d482ac918cc88cf038c3aeae13c1a531..bd92d9671d99b81af401a0f7509ef65ca221024e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1238,7 +1238,7 @@ public final class CraftServer implements Server {
@@ -1239,7 +1239,7 @@ public final class CraftServer implements Server {
} else if (name.equals(levelName + "_the_end")) {
worldKey = net.minecraft.world.level.Level.END;
} else {
@ -17,7 +17,7 @@ index d3c98840ca493259417ab435f8cc70c7e181648d..b404fb1642fa4480f87ad675418c57c8
}
ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, dimensionmanager, this.getServer().progressListenerFactory.create(11),
@@ -1330,6 +1330,15 @@ public final class CraftServer implements Server {
@@ -1331,6 +1331,15 @@ public final class CraftServer implements Server {
return null;
}
@ -34,7 +34,7 @@ index d3c98840ca493259417ab435f8cc70c7e181648d..b404fb1642fa4480f87ad675418c57c8
// Check if a World already exists with the UID.
if (this.getWorld(world.getUID()) != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 706a1c37c81828ab570a7012f96a421d6c9977c1..f6c531d416b4e85df88d0fbed5773cb0b9644c1d 100644
index afe0bb86903c76285804fcb466e043a62ad88b89..d228e085322fb22c3559058edaabb818c4c60111 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2010,6 +2010,11 @@ public class CraftWorld extends CraftRegionAccessor implements World {