geforkt von Mirrors/Paper
c50fc3a026
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 8d818032 PR-723: Add Furnace#getRecipesUsed d7b5a313 PR-726: Add Particle dataTypes to javadocs 72fe8b71 PR-724: Add PDC to World CraftBukkit Changes: c0326c28 PR-1009: Add Furnace#getRecipesUsed cc5ddd79 PR-1010: Add PDC to World 6a54e5d3 PR-1012: Always save as skull owner and not as internal data Spigot Changes: 699290cd Rebuild patches
26 Zeilen
1.3 KiB
Diff
26 Zeilen
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 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 0281a825f5a00f1416405dfe8b1edd9c61fccd93..545074f5f7b109daf17af05fa36a9dc5816f22d4 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
|
@@ -167,7 +167,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
|
if (name == null) {
|
|
this.setProfile(null);
|
|
} else {
|
|
- this.setProfile(new GameProfile(null, name));
|
|
+ // Paper start - Use Online Players Skull
|
|
+ GameProfile newProfile = null;
|
|
+ net.minecraft.server.level.ServerPlayer player = net.minecraft.server.MinecraftServer.getServer().getPlayerList().getPlayerByName(name);
|
|
+ if (player != null) newProfile = player.getGameProfile();
|
|
+ if (newProfile == null) newProfile = new GameProfile(null, name);
|
|
+ this.setProfile(newProfile);
|
|
+ // Paper end
|
|
}
|
|
|
|
return true;
|