mirror of
https://github.com/PaperMC/Paper.git
synced 2024-10-29 23:09:33 +01:00
Silence skull related console spam
This commit is contained in:
parent
1b91579091
commit
908927b6ef
@ -0,0 +1,48 @@
|
|||||||
|
From c8888a07ef487318a1abf690f797b620a8bcdcf0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||||
|
Date: Wed, 23 Apr 2014 10:28:24 +0100
|
||||||
|
Subject: [PATCH] Silence skull related console spam
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/ItemSkull.java b/src/main/java/net/minecraft/server/ItemSkull.java
|
||||||
|
index 49346a6..fbc1f95 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/ItemSkull.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/ItemSkull.java
|
||||||
|
@@ -71,7 +71,7 @@ public class ItemSkull extends Item {
|
||||||
|
if (itemstack.hasTag()) {
|
||||||
|
NBTTagCompound nbttagcompound = itemstack.getTag();
|
||||||
|
|
||||||
|
- if (nbttagcompound.hasKeyOfType("SkullOwner", 10)) {
|
||||||
|
+ if (nbttagcompound.hasKeyOfType("SkullOwner", 10, true)) { // Spigot
|
||||||
|
gameprofile = GameProfileSerializer.a(nbttagcompound.getCompound("SkullOwner"));
|
||||||
|
} else if (nbttagcompound.hasKeyOfType("SkullOwner", 8) && nbttagcompound.getString("SkullOwner").length() > 0) {
|
||||||
|
gameprofile = new GameProfile((UUID) null, nbttagcompound.getString("SkullOwner"));
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java
|
||||||
|
index a239f04..f5b1aee 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/TileEntitySkull.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/TileEntitySkull.java
|
||||||
|
@@ -45,7 +45,7 @@ public class TileEntitySkull extends TileEntity {
|
||||||
|
this.a = nbttagcompound.getByte("SkullType");
|
||||||
|
this.i = nbttagcompound.getByte("Rot");
|
||||||
|
if (this.a == 3) {
|
||||||
|
- if (nbttagcompound.hasKeyOfType("Owner", 10)) {
|
||||||
|
+ if (nbttagcompound.hasKeyOfType("Owner", 10, true)) { // Spigot
|
||||||
|
this.j = GameProfileSerializer.a(nbttagcompound.getCompound("Owner"));
|
||||||
|
} else if (nbttagcompound.hasKeyOfType("ExtraType", 8) && !UtilColor.b(nbttagcompound.getString("ExtraType"))) {
|
||||||
|
this.j = new GameProfile((UUID) null, nbttagcompound.getString("ExtraType"));
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||||
|
index 15e114d..fbeccc8 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
|
||||||
|
@@ -33,7 +33,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
|
||||||
|
CraftMetaSkull(NBTTagCompound tag) {
|
||||||
|
super(tag);
|
||||||
|
|
||||||
|
- if (tag.hasKeyOfType(SKULL_OWNER.NBT, 10)) {
|
||||||
|
+ if (tag.hasKeyOfType(SKULL_OWNER.NBT, 10, true)) { // Spigot
|
||||||
|
profile = GameProfileSerializer.a(tag.getCompound(SKULL_OWNER.NBT));
|
||||||
|
} else if (tag.hasKeyOfType(SKULL_OWNER.NBT, 8)) {
|
||||||
|
profile = MinecraftServer.getServer().getUserCache().a(tag.getString(SKULL_OWNER.NBT));
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user