FileCache ... as always
This commit is contained in:
parent
a8795abc23
commit
26f63ba908
@ -124,7 +124,8 @@ public class FileCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
file = new File(plugin.getDataFolder() + File.separator + "cache" + File.separator + path + File.separator + "armours");
|
file = new File(plugin.getDataFolder() + File.separator + "cache" + File.separator + path + File.separator + "armours");
|
||||||
|
if (!file.getParentFile().exists())
|
||||||
|
file.getParentFile().mkdir();
|
||||||
file.mkdir();
|
file.mkdir();
|
||||||
|
|
||||||
ItemStack[] armors = playerData.getArmour();
|
ItemStack[] armors = playerData.getArmour();
|
||||||
@ -165,7 +166,8 @@ public class FileCache {
|
|||||||
Attribute a = attributes.values().iterator().next();
|
Attribute a = attributes.values().iterator().next();
|
||||||
if (a != null) {
|
if (a != null) {
|
||||||
if (a.getName() != null && a.getAttributeType() != null
|
if (a.getName() != null && a.getAttributeType() != null
|
||||||
&& a.getOperation() != null && a.getUUID() != null)
|
&& a.getOperation() != null && a.getUUID() != null
|
||||||
|
&& a.getAttributeType().getMinecraftId() != null)
|
||||||
writer.write("attribute=" + a.getName() + ";" + a.getAttributeType().getMinecraftId() + ";" + a.getAmount() + ";" + a.getOperation().getId() + ";" + a.getUUID().toString());
|
writer.write("attribute=" + a.getName() + ";" + a.getAttributeType().getMinecraftId() + ";" + a.getAmount() + ";" + a.getOperation().getId() + ";" + a.getUUID().toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user