From a485501ce466de4621c08d70b70841b2d4adfcf7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 28 Jan 2018 19:40:19 -0500 Subject: [PATCH] improve Profile Fill Events early return logic - #997 --- .../0266-Fill-Profile-Property-Events.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/0266-Fill-Profile-Property-Events.patch b/Spigot-Server-Patches/0266-Fill-Profile-Property-Events.patch index 81e934ab4d..27ef91a8e9 100644 --- a/Spigot-Server-Patches/0266-Fill-Profile-Property-Events.patch +++ b/Spigot-Server-Patches/0266-Fill-Profile-Property-Events.patch @@ -1,4 +1,4 @@ -From 97c93bfff69a27ca204861f28b76d848a495b340 Mon Sep 17 00:00:00 2001 +From ab9a259b3a06cfb7d65b6a3e246eb3c732765814 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 2 Jan 2018 00:31:26 -0500 Subject: [PATCH] Fill Profile Property Events @@ -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 +1,71 @@ @@ -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);