Update Upstream

This commit is contained in:
Aikar 2018-01-01 16:29:33 -05:00
parent b7c8cb0244
commit 31aa97180b
4 changed files with 10 additions and 11 deletions

View file

@ -5,11 +5,11 @@ Subject: [PATCH] Don't tick Skulls - unused code
diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java
index 8d2ab289..ccdea51c 100644
index 1e3c687d6..ba02a17e0 100644
--- a/src/main/java/net/minecraft/server/TileEntitySkull.java
+++ b/src/main/java/net/minecraft/server/TileEntitySkull.java
@@ -0,0 +0,0 @@ import com.mojang.authlib.Agent;
import com.mojang.authlib.ProfileLookupCallback;
@@ -0,0 +0,0 @@ import com.mojang.authlib.ProfileLookupCallback;
import java.util.concurrent.Callable;
// Spigot end
-public class TileEntitySkull extends TileEntity implements ITickable {

View file

@ -5,7 +5,7 @@ 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 4976eb26a..a04b3a9e6 100644
index 8a58615f8..987cc9a80 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -0,0 +0,0 @@ import net.minecraft.server.GameProfileSerializer;
@ -20,14 +20,13 @@ index 4976eb26a..a04b3a9e6 100644
if (name == null) {
profile = null;
} else {
- profile = new GameProfile(null, name);
+ // Paper start - Use Online Players Skull
+ EntityPlayer player = MinecraftServer.getServer().getPlayerList().getPlayer(name);
+ if (profile == null && player != null) profile = player.getProfile();
+ if (profile == null) profile = new GameProfile(null, name);
+ // 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 950006003c4f57ca4ac61280c93fdc5ba747ce20
Subproject commit 595eaaa8be13eaf09967819bb60a69aba802fe51

@ -1 +1 @@
Subproject commit b66ad9eed1a41a533e0d7ccf4b7aecfea7a06222
Subproject commit bb614f841467a4bfa110bbed2c9fbc638bc68369