Extend player profile API to support skin changes

Added code that refreshes the player's skin by sending packets with a special order, telling the client to respawn the player and re-apply the game profile
This commit is contained in:
NickAcPT
2018-07-21 16:22:10 +01:00
parent 4cccd48a4c
commit a7f45fb1b4
2 changed files with 21 additions and 130 deletions

View File

@@ -1,27 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NickAcPT <32451103+NickAcPT@users.noreply.github.com>
Date: Sat, 21 Jul 2018 01:30:41 +0100
Subject: [PATCH] Extend player profile API to support skin changes
Added code that refreshes the player's skin by sending packets with a special order, telling the client to respawn the player and re-apply the game profile
diff --git a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java
index e060c38a..98eade06 100644
--- a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java
+++ b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java
@@ -0,0 +0,0 @@ public interface PlayerProfile {
* @return If the profile is now complete (has UUID and Name) (if you get rate limited, this operation may fail)
*/
boolean complete(boolean textures);
+ /**
+ * If this profile is not complete, then make the API call to complete it.
+ * This is a blocking operation and should be done asynchronously.
+ *
+ * Optionally will also fill textures.
+ * @return If the profile is now complete (has UUID and Name) (if you get rate limited, this operation may fail)
+ */
+ boolean complete(boolean textures, boolean force);
/**
* Whether or not this Profile has textures associated to it
--