work and compile errors
This commit is contained in:
@@ -14,29 +14,39 @@ diff --git a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSession
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/profile/PaperMinecraftSessionService.java
|
||||
@@ -0,0 +0,0 @@
|
||||
package com.destroystokyo.paper.profile;
|
||||
|
||||
import com.mojang.authlib.Environment;
|
||||
+import com.destroystokyo.paper.event.profile.FillProfileEvent;
|
||||
+import com.destroystokyo.paper.event.profile.PreFillProfileEvent;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
|
||||
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
|
||||
@@ -0,0 +0,0 @@ public class PaperMinecraftSessionService extends YggdrasilMinecraftSessionServi
|
||||
|
||||
@Override
|
||||
public GameProfile fillProfileProperties(GameProfile profile, boolean requireSecure) {
|
||||
- return super.fillProfileProperties(profile, requireSecure);
|
||||
+ CraftPlayerProfile playerProfile = (CraftPlayerProfile) CraftPlayerProfile.asBukkitMirror(profile);
|
||||
+ new PreFillProfileEvent(playerProfile).callEvent();
|
||||
+ profile = playerProfile.getGameProfile();
|
||||
+ if (profile.isComplete() && profile.getProperties().containsKey("textures")) {
|
||||
+ return profile;
|
||||
+ }
|
||||
+ GameProfile gameProfile = super.fillProfileProperties(profile, requireSecure);
|
||||
+ new FillProfileEvent(CraftPlayerProfile.asBukkitMirror(gameProfile)).callEvent();
|
||||
+ return gameProfile;
|
||||
return super.getTextures(profile, requireSecure);
|
||||
}
|
||||
|
||||
@Override
|
||||
- @Override
|
||||
+ public @Nullable ProfileResult fetchProfile(GameProfile profile, final boolean requireSecure) {
|
||||
+ CraftPlayerProfile playerProfile = (CraftPlayerProfile) CraftPlayerProfile.asBukkitMirror(profile);
|
||||
+ new com.destroystokyo.paper.event.profile.PreFillProfileEvent(playerProfile).callEvent();
|
||||
+ profile = playerProfile.getGameProfile();
|
||||
+ if (profile.getProperties().containsKey("textures")) {
|
||||
+ return new ProfileResult(profile, java.util.Collections.emptySet());
|
||||
+ }
|
||||
+ ProfileResult result = super.fetchProfile(profile.getId(), requireSecure);
|
||||
+ if (result != null) {
|
||||
+ new com.destroystokyo.paper.event.profile.FillProfileEvent(CraftPlayerProfile.asBukkitMirror(result.profile())).callEvent();
|
||||
+ }
|
||||
+ return result;
|
||||
+ }
|
||||
+
|
||||
+ @Override @io.papermc.paper.annotation.DoNotUse @Deprecated
|
||||
public @Nullable ProfileResult fetchProfile(final UUID profileId, final boolean requireSecure) {
|
||||
return super.fetchProfile(profileId, requireSecure);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
|
||||
@@ -0,0 +0,0 @@ public class SkullBlockEntity extends BlockEntity {
|
||||
MinecraftSessionService minecraftsessionservice = SkullBlockEntity.sessionService;
|
||||
|
||||
if (minecraftsessionservice != null) {
|
||||
- ProfileResult profileresult = minecraftsessionservice.fetchProfile(profile.getId(), true);
|
||||
+ ProfileResult profileresult = minecraftsessionservice instanceof com.destroystokyo.paper.profile.PaperMinecraftSessionService paperMinecraftSessionService ? paperMinecraftSessionService.fetchProfile(profile, true) : minecraftsessionservice.fetchProfile(profile.getId(), true); // Paper
|
||||
|
||||
return profileresult == null ? Optional.of(profile) : Optional.of(profileresult.profile());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user