1.15.2 Block name

Discussion in 'Spigot Plugin Development' started by Phoenix852, Mar 1, 2020.

  1. I am trying to figure out how to get the name of a block when broken or placed. I tried b.getType().name().toLowerCase() but it is kinda ill. Like, I place a oak sign and it says sign_post or I place a grass block it says grass. Also it says air when I place other types of sign. I am really confused at this.
  2. The in-game names of items are listed in the ItemID registry last I recall, but someone else probably has found a different way without using NMS at this point (we’re living in 2020, after all).
  3. Then how to get the exact name using id?
  4. Have you defined api-version in your plugin.yml?
  5. Oh thank you :)