From 908927b6efa0b2db1deb03a89eee8ebe9c70c83b Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 23 Apr 2014 10:29:21 +0100 Subject: [PATCH] Silence skull related console spam --- ...3-Silence-skull-related-console-spam.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 CraftBukkit-Patches/0143-Silence-skull-related-console-spam.patch diff --git a/CraftBukkit-Patches/0143-Silence-skull-related-console-spam.patch b/CraftBukkit-Patches/0143-Silence-skull-related-console-spam.patch new file mode 100644 index 0000000000..81f212a934 --- /dev/null +++ b/CraftBukkit-Patches/0143-Silence-skull-related-console-spam.patch @@ -0,0 +1,48 @@ +From c8888a07ef487318a1abf690f797b620a8bcdcf0 Mon Sep 17 00:00:00 2001 +From: Thinkofdeath +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 +