improve Profile Fill Events early return logic - #997
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user