Skip to content

Commit

Permalink
Remove nameable
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Dec 3, 2022
1 parent 917b474 commit 5826721
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/net/citizensnpcs/api/npc/AbstractNPC.java
Expand Up @@ -458,6 +458,12 @@ public void setFlyable(boolean flyable) {
@Override
public void setItemProvider(Supplier<ItemStack> provider) {
this.itemProvider = provider;
ItemStack stack = provider.get();
if (stack != null) {
data().set(NPC.Metadata.ITEM_ID, stack.getType().getId());
data().set(NPC.Metadata.ITEM_DATA, stack.getData().getData());
data().set(NPC.Metadata.ITEM_AMOUNT, stack.getAmount());
}
}

@Override
Expand Down

0 comments on commit 5826721

Please sign in to comment.