From afdb0d03247f2c43e1a137c21ef606caf2abd3ef Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Mon, 10 Dec 2012 16:30:48 +0100 Subject: [PATCH] Remember to perform deep cloning. --- ProtocolLib/dependency-reduced-pom.xml | 2 +- .../com/comphenix/protocol/wrappers/WrappedDataWatcher.java | 2 +- .../com/comphenix/protocol/wrappers/WrappedWatchableObject.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ProtocolLib/dependency-reduced-pom.xml b/ProtocolLib/dependency-reduced-pom.xml index 4830e8fd..00d4c784 100644 --- a/ProtocolLib/dependency-reduced-pom.xml +++ b/ProtocolLib/dependency-reduced-pom.xml @@ -4,7 +4,7 @@ com.comphenix.protocol ProtocolLib ProtocolLib - 1.8.0-SNAPSHOT + 1.8.0 Provides read/write access to the Minecraft protocol. http://dev.bukkit.org/server-mods/protocollib/ diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedDataWatcher.java b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedDataWatcher.java index 306ac18e..90eeb283 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedDataWatcher.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedDataWatcher.java @@ -300,7 +300,7 @@ public class WrappedDataWatcher implements Iterable { // Make a new copy instead for (WrappedWatchableObject watchable : this) { - clone.setObject(watchable.getIndex(), watchable.getValue()); + clone.setObject(watchable.getIndex(), watchable.getClonedValue()); } return clone; } diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java index 33207cf1..c3af7039 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java @@ -307,7 +307,7 @@ public class WrappedWatchableObject { } // Helper - private Object getClonedValue() throws FieldAccessException { + Object getClonedValue() throws FieldAccessException { Object value = getValue(); // Only a limited set of references types are supported