mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
Update Upstream
This commit is contained in:
parent
27a4d45e39
commit
c3432c8d29
4 changed files with 15 additions and 16 deletions
|
@ -1,11 +1,11 @@
|
|||
From f30b8e431b4adb7701d0fda4d572b2195f05ef67 Mon Sep 17 00:00:00 2001
|
||||
From 84333515d4922a89743e89d319d7504fb6084905 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 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
|
||||
@@ -6,6 +6,7 @@ import net.minecraft.server.GameProfileSerializer;
|
||||
|
@ -16,20 +16,19 @@ index 4976eb26a..a04b3a9e6 100644
|
|||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
@@ -151,8 +152,12 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
||||
@@ -141,7 +142,11 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
||||
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;
|
||||
--
|
||||
2.14.1.windows.1
|
||||
2.15.1
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
From 4f00524bf0bf8b0a02362aa9d10acab6d82816b1 Mon Sep 17 00:00:00 2001
|
||||
From a53c246441ef3bdecad65ca57c5e1258a4a03f2e Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 13 Apr 2016 00:30:10 -0400
|
||||
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
|
||||
@@ -21,7 +21,7 @@ import com.mojang.authlib.Agent;
|
||||
import com.mojang.authlib.ProfileLookupCallback;
|
||||
@@ -24,7 +24,7 @@ import com.mojang.authlib.ProfileLookupCallback;
|
||||
import java.util.concurrent.Callable;
|
||||
// Spigot end
|
||||
|
||||
-public class TileEntitySkull extends TileEntity implements ITickable {
|
||||
|
@ -18,5 +18,5 @@ index 8d2ab289..ccdea51c 100644
|
|||
private int a;
|
||||
public int rotation;
|
||||
--
|
||||
2.13.1.windows.2
|
||||
2.15.1
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 950006003c4f57ca4ac61280c93fdc5ba747ce20
|
||||
Subproject commit 595eaaa8be13eaf09967819bb60a69aba802fe51
|
|
@ -1 +1 @@
|
|||
Subproject commit b66ad9eed1a41a533e0d7ccf4b7aecfea7a06222
|
||||
Subproject commit bb614f841467a4bfa110bbed2c9fbc638bc68369
|
Loading…
Reference in a new issue