mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-22 16:21:29 +01:00
Update upstream
This commit is contained in:
parent
fa0bd763ae
commit
09a8e2f02f
@ -8,13 +8,10 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||||
@@ -0,0 +0,0 @@ package org.bukkit.craftbukkit.inventory;
|
@@ -0,0 +0,0 @@ import net.minecraft.server.GameProfileSerializer;
|
||||||
|
import net.minecraft.server.NBTBase;
|
||||||
import java.util.Map;
|
import net.minecraft.server.NBTTagCompound;
|
||||||
|
import net.minecraft.server.TileEntitySkull;
|
||||||
-import net.minecraft.server.GameProfileSerializer;
|
|
||||||
-import net.minecraft.server.NBTBase;
|
|
||||||
-import net.minecraft.server.NBTTagCompound;
|
|
||||||
+import net.minecraft.server.*;
|
+import net.minecraft.server.*;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -23,12 +20,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
if (name == null) {
|
if (name == null) {
|
||||||
profile = null;
|
profile = null;
|
||||||
} else {
|
} else {
|
||||||
- profile = new GameProfile(null, name);
|
+ // Paper start - Use Online Players Skull
|
||||||
+ // Paper start - Check usercache if the player is online
|
|
||||||
+ EntityPlayer player = MinecraftServer.getServer().getPlayerList().getPlayer(name);
|
+ EntityPlayer player = MinecraftServer.getServer().getPlayerList().getPlayer(name);
|
||||||
+ profile = player != null ? player.getProfile() : new GameProfile(null, name);
|
+ if (profile == null && player != null) profile = player.getProfile();
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
// Spigot start
|
||||||
|
- profile = TileEntitySkull.skinCache.getIfPresent(name.toLowerCase(java.util.Locale.ROOT));
|
||||||
|
+ if (profile == null) profile = TileEntitySkull.skinCache.getIfPresent(name.toLowerCase(java.util.Locale.ROOT)); // Paper
|
||||||
|
if (profile == null) profile = new GameProfile(null, name);
|
||||||
|
// Spigot end
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
--
|
--
|
@ -1 +1 @@
|
|||||||
Subproject commit 16c940b0677cc9065df920e1113c80b5a047ca32
|
Subproject commit 261f18109ea6338aa7a5dfe34fbb87e87945b8e5
|
Loading…
Reference in New Issue
Block a user