Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display name must be in nbt, not in item name. #1904

Closed
1 task done
KaffinPX opened this issue May 11, 2021 · 2 comments
Closed
1 task done

Display name must be in nbt, not in item name. #1904

KaffinPX opened this issue May 11, 2021 · 2 comments
Labels
possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f

Comments

@KaffinPX
Copy link
Contributor

KaffinPX commented May 11, 2021

  • The FAQ doesn't contain a resolution to my issue

Versions

  • mineflayer: latest
  • server: vanilla/spigot/paper probably all
  • node: 14

Detailed description of a problem

Displayname get from items name, not real display name.

What did you try yet?

Opened a window and readed custom names

Did you try any method from the API? no
Did you try any example? Any error from those? no

Your current code

/*
      if (command === 'inventory') {
        const embed = new Discord.MessageEmbed()
        .setTitle('Inventory')
        .setColor('#eeeeee')
        for (const Item of bot.inventory.items()) {
          embed.addField(`${Item.slot}:${Item.displayName}`, `x${Item.count}`, true) //displayName isnt real displayName
        }
  
        channel.send(embed)  
      }
*/

Expected behavior

Displayname must be taken in nbt..

Additional context

nthing

@KaffinPX KaffinPX added Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f possible bug labels May 11, 2021
@KaffinPX
Copy link
Contributor Author

displayName is items name with spaces, not nbtdata.

@u9g
Copy link
Member

u9g commented May 11, 2021

displayName is what the item is called in vanilla minecraft, you can try
item.customName

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Projects
None yet
Development

No branches or pull requests

2 participants