Update upstream
This commit is contained in:
@@ -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;
|
|
||||||
--
|
--
|
||||||
Submodule work/Spigot updated: 16c940b067...261f18109e
Reference in New Issue
Block a user