Use proper UUID methods

This commit is contained in:
raoulvdberge
2018-05-26 14:29:14 +02:00
parent 3124e3d2ce
commit 2eeba970a3

View File

@@ -141,7 +141,7 @@ public abstract class NetworkNode implements INetworkNode, INetworkNodeVisitor,
@Override @Override
public NBTTagCompound write(NBTTagCompound tag) { public NBTTagCompound write(NBTTagCompound tag) {
if (owner != null) { if (owner != null) {
tag.setString(NBT_OWNER, owner.toString()); // @todo: Use proper NBT UUID methods tag.setUniqueId(NBT_OWNER, owner);
} }
writeConfiguration(tag); writeConfiguration(tag);
@@ -158,7 +158,7 @@ public abstract class NetworkNode implements INetworkNode, INetworkNodeVisitor,
public void read(NBTTagCompound tag) { public void read(NBTTagCompound tag) {
if (tag.hasKey(NBT_OWNER)) { if (tag.hasKey(NBT_OWNER)) {
owner = UUID.fromString(tag.getString(NBT_OWNER)); // @todo: Use proper NBT UUID methods owner = tag.getUniqueId(NBT_OWNER);
} }
readConfiguration(tag); readConfiguration(tag);