Solved Get complete id data.

Discussion in 'Plugin Development' started by Dablakbandit, Dec 8, 2013.

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

    Dablakbandit

    I am trying to get the complete id data in my onBlockBreak but am unable to?

    Code:java
    1. public void onBlockBreak(BlockBreakEvent event)
    2. {
    3. Block block = event.getBlock();
    4. log.info("" + block.getType().getId());
    5. }


    Which when i break a colored wool block returns 35 , but on the colored wool block orange, i want to get the data 35:1, how would i do this?

    Thanks in advanced!
    Dablakbandit
     
  2. Offline

    SnowGears

    Use MaterialData. Its either block.getData() or block.getType().getData(). I don't remember which. But thats what will work for ya.
     
  3. Offline

    Dablakbandit

    SnowGears
    its block.getData()

    Thanks alot!,
    Dablakbandit
     
Thread Status:
Not open for further replies.

Share This Page