mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-30 06:03:30 +01:00
Added cache method greatly improving performance.
This commit is contained in:
parent
2d68da5b59
commit
9d92059ea1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user