Stained Glass Pane

Discussion in 'Spigot Plugin Development' started by DidactCraft, May 25, 2015.

  1. Ok, so I would like to create a stained glass pane that is color of lime/green. How on earth do I do this? Anything know?

    Thanks in advance
     
  2. Material.STAINED_GLASS, 3
     
  3. Nothing much
     
    • Funny Funny x 2
  4. Look at ItemStack's constructors. I am sure you can find it in the Javadocs yourself.
     
  5. Ok, but how do I make it green/red ?
    Thanks anyways <3
     
  6.  
  7. Yes I have done that, but It makes it 3 blocks of stained glass, not a color?
     
  8.  
  9. Tried to, haven't found anything :(
     
  10. Not setting a block, I'm trying to set a glass pane in a inventory I have made, for accept and deny.
     
  11. Material.STAINED_GLASS, 1, 3
     
  12. I don't sure but, I use that.

    Green:
    Code (Text):
    p.getInventory().addItem(new ItemStack(Material.STAINED_GLASS, 1, (short)13));
    Red:
    Code (Text):
    p.getInventory().addItem(new ItemStack(Material.STAINED_GLASS, 1, (short)14));
     
  13. Tried it. Didn't work :(
     
  14. Try this:

     
  15. Thanks it worked!
     
  16. Sorry to bump this, but I was wondering if there is a place in the javadocs where you can find the durability/data of items that make them different. Like in this case. I know there are more items like this and was wondering where I could find a "key."
     
  17. You can alos add the color with item.setDurability((short) 3); i think