1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-03 21:37:28 +01:00

improve Profile Fill Events early return logic -

This commit is contained in:
Aikar 2018-01-28 19:40:19 -05:00
parent 690c955207
commit 66e439e381

View file

@ -12,7 +12,7 @@ This is useful for implementing a ProfileCache for Player Skulls
diff --git a/src/main/java/com/destroystokyo/paper/profile/WrappedMinecraftSessionService.java b/src/main/java/com/destroystokyo/paper/profile/WrappedMinecraftSessionService.java
new file mode 100644
index 000000000..0901d9838
index 000000000..9914f98c2
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/WrappedMinecraftSessionService.java
@@ -0,0 +0,0 @@
@ -79,7 +79,7 @@ index 000000000..0901d9838
+ @Override
+ public GameProfile fillProfileProperties(GameProfile profile, boolean requireSecure) {
+ new PreFillProfileEvent(CraftPlayerProfile.asBukkitMirror(profile)).callEvent();
+ if (!profile.getProperties().isEmpty()) {
+ if (profile.isComplete() && profile.getProperties().containsKey("textures")) {
+ return profile;
+ }
+ GameProfile gameProfile = orig.fillProfileProperties(profile, requireSecure);