mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-24 11:36:51 +01:00
Remember to perform deep cloning.
This commit is contained in:
parent
40345f25ff
commit
afdb0d0324
@ -4,7 +4,7 @@
|
||||
<groupId>com.comphenix.protocol</groupId>
|
||||
<artifactId>ProtocolLib</artifactId>
|
||||
<name>ProtocolLib</name>
|
||||
<version>1.8.0-SNAPSHOT</version>
|
||||
<version>1.8.0</version>
|
||||
<description>Provides read/write access to the Minecraft protocol.</description>
|
||||
<url>http://dev.bukkit.org/server-mods/protocollib/</url>
|
||||
<developers>
|
||||
|
@ -300,7 +300,7 @@ public class WrappedDataWatcher implements Iterable<WrappedWatchableObject> {
|
||||
|
||||
// Make a new copy instead
|
||||
for (WrappedWatchableObject watchable : this) {
|
||||
clone.setObject(watchable.getIndex(), watchable.getValue());
|
||||
clone.setObject(watchable.getIndex(), watchable.getClonedValue());
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user