mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-21 09:21:21 +01:00
Fixed display name not working and prompting console errors
This commit is contained in:
parent
16d93e244d
commit
159031c8ec
@ -32,7 +32,7 @@ public class DisplayName extends StringStat implements GemStoneStat {
|
||||
public void whenApplied(@NotNull ItemStackBuilder item, @NotNull StringData data) {
|
||||
|
||||
// Make sure stat history exists
|
||||
Validate.isTrue(item.getMMOItem().hasStatHistory(this));
|
||||
item.getMMOItem().computeStatHistory(this);
|
||||
|
||||
final ItemTier tier = item.getMMOItem().getTier();
|
||||
final AdventureParser parser = MythicLib.plugin.getAdventureParser();
|
||||
|
@ -100,7 +100,7 @@ public class SkullTextureStat extends ItemStat<SkullTextureData, SkullTextureDat
|
||||
try {
|
||||
// TODO better exception handling
|
||||
final ItemMeta meta = mmoitem.getNBT().getItem().getItemMeta();
|
||||
Validate.isTrue(meta instanceof SkullMeta);
|
||||
Validate.isTrue(meta instanceof SkullMeta, "Item is not a skull");
|
||||
final Object profile = MythicLib.plugin.getVersion().getWrapper().getProfile((SkullMeta) meta);
|
||||
mmoitem.setData(ItemStats.SKULL_TEXTURE, new SkullTextureData(profile));
|
||||
} catch (RuntimeException ignored) {
|
||||
|
Loading…
Reference in New Issue
Block a user