Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-17 12:00:07 +01:00
70ce6ce831
This makes it easier for downstream projects (forks) to replace the version fetching system with their own. It is as simple as implementing an interface and overriding the default implementation of org.bukkit.UnsafeValues#getVersionFetcher() It also makes it easier for us to organize things like the version history feature. Lastly I have updated the paper implementation to check against the site API rather than against jenkins.
29 Zeilen
1.2 KiB
Diff
29 Zeilen
1.2 KiB
Diff
From bed33fb7866d2760f7fb79a8b8534c7468de5764 Mon Sep 17 00:00:00 2001
|
|
From: Techcable <Techcable@outlook.com>
|
|
Date: Wed, 2 Mar 2016 23:42:37 -0600
|
|
Subject: [PATCH] Use UserCache for player heads
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
|
index c83bebe70..0136e1bfe 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
|
@@ -155,7 +155,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
|
if (name == null) {
|
|
profile = null;
|
|
} else {
|
|
- profile = new GameProfile(null, name);
|
|
+ // Paper start - Use Online Players Skull
|
|
+ GameProfile newProfile = null;
|
|
+ net.minecraft.server.EntityPlayer player = net.minecraft.server.MinecraftServer.getServer().getPlayerList().getPlayer(name);
|
|
+ if (player != null) newProfile = player.getProfile();
|
|
+ if (newProfile == null) newProfile = new GameProfile(null, name);
|
|
+ profile = newProfile;
|
|
+ // Paper end
|
|
}
|
|
|
|
return true;
|
|
--
|
|
2.21.0
|
|
|