From 65e665aa592536c11b9a4c4694e71b93f78cab54 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Wed, 4 Dec 2013 15:55:17 +0100 Subject: [PATCH] Don't compare NBT names - they are no longer persistant. --- .../src/main/java/com/comphenix/protocol/PacketType.java | 2 +- .../com/comphenix/protocol/wrappers/nbt/WrappedElement.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/PacketType.java b/ProtocolLib/src/main/java/com/comphenix/protocol/PacketType.java index 7da64a13..0ab55897 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/PacketType.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/PacketType.java @@ -141,7 +141,7 @@ public class PacketType implements Serializable { public static final PacketType SET_SLOT = new PacketType(PROTOCOL, SENDER, 0x2F, 103); public static final PacketType WINDOW_ITEMS = new PacketType(PROTOCOL, SENDER, 0x30, 104); public static final PacketType CRAFT_PROGRESS_BAR = new PacketType(PROTOCOL, SENDER, 0x31, 105); - public static final PacketType TRANSACTION = new PacketType(PROTOCOL, SENDER, 0x32, 106); + public static final PacketType TRANSACTION = new PacketType(PROTOCOL, SENDER, 0x32, 106); public static final PacketType UPDATE_SIGN = new PacketType(PROTOCOL, SENDER, 0x33, 130); public static final PacketType ITEM_DATA = new PacketType(PROTOCOL, SENDER, 0x34, 131); public static final PacketType TILE_ENTITY_DATA = new PacketType(PROTOCOL, SENDER, 0x35, 132); diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/WrappedElement.java b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/WrappedElement.java index 76146756..88602313 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/WrappedElement.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/nbt/WrappedElement.java @@ -227,8 +227,7 @@ class WrappedElement implements NbtWrapper { // Make sure we're dealing with the same type if (other.getType().equals(getType())) { - return Objects.equal(getName(), other.getName()) && - Objects.equal(getValue(), other.getValue()); + return Objects.equal(getValue(), other.getValue()); } } return false;