Add SkullMeta.setPlayerProfile API

This allows you to create already filled textures on Skulls to avoid texture lookups
which commonly cause rate limit issues with Mojang API
This commit is contained in:
Aikar
2018-01-19 00:38:49 -05:00
parent d065e0b00e
commit e06cc30ff7
4 changed files with 127 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ profiles that had to be looked up.
diff --git a/src/main/java/com/destroystokyo/paper/profile/WrappedGameProfileRepository.java b/src/main/java/com/destroystokyo/paper/profile/WrappedGameProfileRepository.java
new file mode 100644
index 000000000..950fa930d
index 000000000..bffba6a65
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/WrappedGameProfileRepository.java
@@ -0,0 +0,0 @@
@@ -71,7 +71,7 @@ index 000000000..950fa930d
+
+ @Override
+ public void onProfileLookupSucceeded(GameProfile gameProfile) {
+ PlayerProfile from = CraftPlayerProfile.from(gameProfile);
+ PlayerProfile from = CraftPlayerProfile.asBukkitMirror(gameProfile);
+ new LookupProfileEvent(from).callEvent();
+ callback.onProfileLookupSucceeded(gameProfile);
+ }