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 c1b2edb7..1ef3de0f 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/wrappers/WrappedWatchableObject.java @@ -218,6 +218,14 @@ public class WrappedWatchableObject { modifier.withType(Object.class).write(0, getUnwrapped(newValue)); } + /** + * Read the underlying value field. + * @return The underlying value. + */ + private Object getNMSValue() { + return modifier.withType(Object.class).read(0); + } + /** * Read the value field. * @return The watched value. @@ -324,7 +332,7 @@ public class WrappedWatchableObject { // Helper Object getClonedValue() throws FieldAccessException { - Object value = getValue(); + Object value = getNMSValue(); // Only a limited set of references types are supported if (MinecraftReflection.isChunkPosition(value)) {