Wood types

Discussion in 'Plugin Development' started by Joshua Neicho, Mar 19, 2011.

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

    Joshua Neicho

    hi im wondering how i would get the birch wood instead of the normal wood
    the code i use for giving it to the player right now is
    Code:
            if (cmd.getName().compareToIgnoreCase("birch") == 0) {
    
                player.getInventory().addItem(new ItemStack(Material.LOG, 64));
            }
    the reason i use log is because i dont know how to get the log to be birch
    and the command does work
     
  2. Offline

    Sammy

    They are the same Material.LOG what changes is the "skin" and i think it's changed by the durability
    Code:
    .setDurability((short)0); Normal
    .setDurability((short)1); pine
    .setDurability((short)2); birch
     
  3. Offline

    DiddiZ

  4. Offline

    Sammy

    That I didn't knew, awesome DiddiZ =)
     
  5. Offline

    Joshua Neicho

    thanks both of you
     
Thread Status:
Not open for further replies.

Share This Page