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
|
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
|
new file mode 100644
|
||||||
index 000000000..0901d9838
|
index 000000000..9914f98c2
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/profile/WrappedMinecraftSessionService.java
|
+++ b/src/main/java/com/destroystokyo/paper/profile/WrappedMinecraftSessionService.java
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
@ -79,7 +79,7 @@ index 000000000..0901d9838
|
|||||||
+ @Override
|
+ @Override
|
||||||
+ public GameProfile fillProfileProperties(GameProfile profile, boolean requireSecure) {
|
+ public GameProfile fillProfileProperties(GameProfile profile, boolean requireSecure) {
|
||||||
+ new PreFillProfileEvent(CraftPlayerProfile.asBukkitMirror(profile)).callEvent();
|
+ new PreFillProfileEvent(CraftPlayerProfile.asBukkitMirror(profile)).callEvent();
|
||||||
+ if (!profile.getProperties().isEmpty()) {
|
+ if (profile.isComplete() && profile.getProperties().containsKey("textures")) {
|
||||||
+ return profile;
|
+ return profile;
|
||||||
+ }
|
+ }
|
||||||
+ GameProfile gameProfile = orig.fillProfileProperties(profile, requireSecure);
|
+ GameProfile gameProfile = orig.fillProfileProperties(profile, requireSecure);
|
||||||
|
|||||||
Reference in New Issue
Block a user