Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
improve Profile Fill Events early return logic - #997
Dieser Commit ist enthalten in:
Ursprung
09182f737d
Commit
a485501ce4
@ -1,4 +1,4 @@
|
||||
From 97c93bfff69a27ca204861f28b76d848a495b340 Mon Sep 17 00:00:00 2001
|
||||
From ab9a259b3a06cfb7d65b6a3e246eb3c732765814 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
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);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren