forked from Upstream/mmocore
Currency items can now use custom-model-data
This commit is contained in:
parent
c5d26d60cc
commit
79007f38af
@ -78,6 +78,10 @@ public class ConfigItem {
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getModelData() {
|
||||
return modeldata;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.inventory.ItemFlag;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.version.nms.ItemTag;
|
||||
|
||||
public class CurrencyItem extends ConfigItem {
|
||||
@ -34,6 +35,9 @@ public class CurrencyItem extends ConfigItem {
|
||||
getLore().forEach(line -> lore.add(format(line)));
|
||||
meta.setLore(lore);
|
||||
|
||||
if(MMOCore.plugin.version.isStrictlyHigher(1, 13))
|
||||
meta.setCustomModelData(getModelData());
|
||||
|
||||
item.setItemMeta(meta);
|
||||
return NBTItem.get(item).add(new ItemTag("RpgWorth", worth)).toItem();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user