Getting the item meta of a block?

Discussion in 'Plugin Development' started by techboy291, Dec 31, 2012.

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

    techboy291

    Hi,


    I'm trying to make it so when a player looks at a steve skull and they type in a command specifying the player head they want it to look like, the skull changes to that head. The problem is, I'm using "getTargetBlock()", and I can't figure out how to get the item meta of the block. Ideas?
     
  2. Offline

    tommycake50

    you cant get the meta of placed blocks.
    EDIT:
    Skull s = (Skull)Location().getBlock().getState();
    s.setOwner("ownername");
     
  3. Offline

    fireblast709

    s.update() afterwards ;3
     
  4. Offline

    tommycake50

    yeah your right :I.
     
  5. Offline

    techboy291

    Thanks!
     
Thread Status:
Not open for further replies.

Share This Page