[SOLVED] Get Material from String

Discussion in 'Plugin Development' started by cholo71796, Jul 13, 2011.

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

    cholo71796

    This should be really easy, but I can't find it anywhere. Any help?
     
  2. Offline

    Hretsam

    You want to get a org.bukkit.Material from a string?

    Try:
    Material.getMaterial("String");
     
  3. Offline

    cholo71796

    Thanks!
     
  4. Offline

    caHarkness

    Hope I'm not digging up anything too old, but does this return a material based on the given string? If so, how do we know exactly which string pairs with what item?
     
  5. Offline

    nisovin

  6. Offline

    nicholasntp

    So how would you convert the Material to a String? Sorry if this is totally off topic. I just need the opposite of what the thread is about.
     
  7. Offline

    nickrak

    toString()
     
  8. Offline

    nicholasntp

    thanks xD. *facepalm*
     
Thread Status:
Not open for further replies.

Share This Page