Added cache method greatly improving performance.

This commit is contained in:
Brianna O'Keefe 2018-11-13 20:03:08 -05:00
parent 2d68da5b59
commit 9d92059ea1

View File

@ -7,6 +7,8 @@ public class KitContentItem implements KitContent {
private ItemStack itemStack;
private String serialized = null;
public KitContentItem(ItemStack itemStack) {
this.itemStack = itemStack;
}
@ -17,7 +19,9 @@ public class KitContentItem implements KitContent {
@Override
public String getSerialized() {
return Methods.serializeItemStack(itemStack);
if (serialized != null) return serialized;
serialized = Methods.serializeItemStack(itemStack);
return serialized;
}
@Override