more cleanup and resource pack api fixes

This commit is contained in:
Jake Potrebic 2023-12-08 15:13:02 -08:00
parent 7606e6da39
commit f17622cc3d
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
59 changed files with 490 additions and 332 deletions

View file

@ -93,34 +93,36 @@ index aad8b2fbdbb03fbf32f99b3a533716eca9d42219..405b6a388c3593a83985f766e79b9295
/**
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 695bdf0bca8af1360d4deeb4aadedf1fb4140223..7a24cc6617b55bdeea4cf6d70e3abb835b0697bf 100644
index 2787f205b08b9c0dc97c6a49ade01b319ef23630..985185802e0ad5d063e83ad22a1bcc735d722f04 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2787,6 +2787,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
*/
boolean hasResourcePack();
+
@@ -2853,6 +2853,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
}
// Paper end
+ // Paper start - Player Profile API
+ /**
+ * Gets a copy of this players profile
+ *
+ * @return The players profile object
+ */
+ @NotNull
+ com.destroystokyo.paper.profile.PlayerProfile getPlayerProfile();
+ com.destroystokyo.paper.profile.@NotNull PlayerProfile getPlayerProfile();
+
+ /**
+ * Changes the PlayerProfile for this player. This will cause this player
+ * to be reregistered to all clients that can currently see this player.
+ *
+ * to be re-registered to all clients that can currently see this player.
+ * <p>
+ * After executing this method, the player {@link java.util.UUID} won't
+ * be swapped, only their name and gameprofile properties.
+ * be swapped, only their name and profile properties.
+ *
+ * @param profile The new profile to use
+ */
+ void setPlayerProfile(@NotNull com.destroystokyo.paper.profile.PlayerProfile profile);
// Paper end
+ void setPlayerProfile(com.destroystokyo.paper.profile.@NotNull PlayerProfile profile);
+ // Paper end - Player Profile API
+
// Spigot start
public class Spigot extends Entity.Spigot {
diff --git a/src/main/java/org/bukkit/profile/PlayerProfile.java b/src/main/java/org/bukkit/profile/PlayerProfile.java
index fc46add38bf59dc1a04ea566fd230dcd8ae2708c..d36b3e3c7e53840132011add365ca2a26d799064 100644
--- a/src/main/java/org/bukkit/profile/PlayerProfile.java