Remember to perform deep cloning.
Dieser Commit ist enthalten in:
Ursprung
40345f25ff
Commit
afdb0d0324
@ -4,7 +4,7 @@
|
|||||||
<groupId>com.comphenix.protocol</groupId>
|
<groupId>com.comphenix.protocol</groupId>
|
||||||
<artifactId>ProtocolLib</artifactId>
|
<artifactId>ProtocolLib</artifactId>
|
||||||
<name>ProtocolLib</name>
|
<name>ProtocolLib</name>
|
||||||
<version>1.8.0-SNAPSHOT</version>
|
<version>1.8.0</version>
|
||||||
<description>Provides read/write access to the Minecraft protocol.</description>
|
<description>Provides read/write access to the Minecraft protocol.</description>
|
||||||
<url>http://dev.bukkit.org/server-mods/protocollib/</url>
|
<url>http://dev.bukkit.org/server-mods/protocollib/</url>
|
||||||
<developers>
|
<developers>
|
||||||
|
@ -300,7 +300,7 @@ public class WrappedDataWatcher implements Iterable<WrappedWatchableObject> {
|
|||||||
|
|
||||||
// Make a new copy instead
|
// Make a new copy instead
|
||||||
for (WrappedWatchableObject watchable : this) {
|
for (WrappedWatchableObject watchable : this) {
|
||||||
clone.setObject(watchable.getIndex(), watchable.getValue());
|
clone.setObject(watchable.getIndex(), watchable.getClonedValue());
|
||||||
}
|
}
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ public class WrappedWatchableObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Helper
|
// Helper
|
||||||
private Object getClonedValue() throws FieldAccessException {
|
Object getClonedValue() throws FieldAccessException {
|
||||||
Object value = getValue();
|
Object value = getValue();
|
||||||
|
|
||||||
// Only a limited set of references types are supported
|
// Only a limited set of references types are supported
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren