Development Assistance Get item ID from Material

Discussion in 'Plugin Help/Development/Requests' started by Bammerbom, Dec 22, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Bammerbom

    How to get the NEW item id (for example minecraft:stone) from the Material?

    So Material -> Item ID (String)
     
    Last edited: Dec 22, 2014
  2. @Bammerbom Put it to lowercase and prepend "minecraft:"?
     
  3. Offline

    Bammerbom

    @AdamQpzm That is not always the correct name.

    For example minecraft:gunpowder = Material.SULPHUR
     
  4. @Bammerbom *shurgs* I don't know of any that are different. Look up a list of them and compare. :)
     
  5. Offline

    Bammerbom

    @AdamQpzm Really?!?!?!? Doesnt bukkit have any method for that :(
     
  6. @Bammerbom Nope. To be fair, the minecraft IDs didn't come into use until Bukkit stopped being developed, afaik.
     
  7. Offline

    Bammerbom

    @AdamQpzm Is there any NMS or OBC method that does this?
     
  8. Offline

    Bammerbom

    @AdamQpzm I am using the Spigot 1.8 build.
     
  9. Moved to Bukkit Alternates.


    @Bammerbom Material.getMaterial(id);
     
  10. Offline

    Bammerbom

    I mean Material -> String, and not String -> Material
     
Thread Status:
Not open for further replies.

Share This Page