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

@ -7,10 +7,10 @@ Provides basic elements of a PlayerProfile to be used by future API/events
diff --git a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java
new file mode 100644
index 0000000000000000000000000000000000000000..a4d84b5dc76c6ace93ce1467f7d6b48df97fcf5f
index 0000000000000000000000000000000000000000..d4766e2116c2202d84080637a2832bef0ab3f718
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java
@@ -0,0 +1,197 @@
@@ -0,0 +1,199 @@
+package com.destroystokyo.paper.profile;
+
+import java.util.Collection;
@ -39,6 +39,7 @@ index 0000000000000000000000000000000000000000..a4d84b5dc76c6ace93ce1467f7d6b48d
+ * @return The previous Name
+ */
+ @NotNull
+ @Deprecated(forRemoval = true)
+ String setName(@Nullable String name);
+
+ /**
@ -53,6 +54,7 @@ index 0000000000000000000000000000000000000000..a4d84b5dc76c6ace93ce1467f7d6b48d
+ * @return The previous UUID
+ */
+ @Nullable
+ @Deprecated(forRemoval = true)
+ UUID setId(@Nullable UUID uuid);
+
+ /**