mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-03-31 17:35:43 +02:00
Supports durability for items with no lore
This commit is contained in:
parent
f70c277462
commit
b95896c4b7
@ -36,13 +36,15 @@ public class LoreUpdate {
|
||||
this.item = item;
|
||||
this.old = old;
|
||||
this.replace = replace;
|
||||
|
||||
// Quite impossible that an MMOItem has no lore
|
||||
this.lore = item.getItemMeta().getLore();
|
||||
}
|
||||
|
||||
public ItemStack updateLore() {
|
||||
|
||||
// Possible that the item has no lore
|
||||
if (lore == null || lore.isEmpty())
|
||||
return item;
|
||||
|
||||
for (int i = 0; i < lore.size(); i++) {
|
||||
|
||||
// Finds the old line in the old lore
|
||||
|
Loading…
Reference in New Issue
Block a user