Material and Block Data

Discussion in 'Plugin Development' started by MarkusK96, Feb 2, 2015.

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

    MarkusK96

    Code:
    Material material = Material.STONE;
    int amount = 15;
    if (p.getInventory().contains(new ItemStack(mat, amount))){
        p.sendMessage("You have 15 STONE");
    }
    
    By using this I can check whether a player has 15 STONE in his inventory.

    How can I do the same with Granite? There is no Material.GRANITE.
     
  2. Offline

    NathanWolf

  3. Offline

    sirrus86

    Granite uses the same material as stone, it just uses a different data value. You can find more info here.
     
Thread Status:
Not open for further replies.

Share This Page