Try to fix a problem with attribute ?

This commit is contained in:
Xephi59 2015-01-08 20:07:05 +01:00
parent 1a499150c8
commit d0234c182c

View File

@ -107,8 +107,11 @@ public class FileCache {
Attribute a = attributes.values().iterator().next(); Attribute a = attributes.values().iterator().next();
if (a != null) { if (a != null) {
try { try {
if (a.getName() != null && a.getAttributeType() != null
&& a.getOperation() != null && a.getUUID() != 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());
} catch (Exception e) {} } catch (Exception e) {
} catch (Error e) {}
} }
} }
} else { } else {
@ -158,6 +161,8 @@ public class FileCache {
Attribute a = attributes.values().iterator().next(); Attribute a = attributes.values().iterator().next();
if (a != null) { if (a != null) {
try { try {
if (a.getName() != null && a.getAttributeType() != null
&& a.getOperation() != null && a.getUUID() != 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());
} catch (Exception e) {} } catch (Exception e) {}
} }