1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CHECK GETDATA ON IF STATEMENT

Discussion in 'Java' started by simonsejse, Jan 25, 2018.

  1. simonsejse

    simonsejse Member

    Joined:
    Feb 10, 2017
    Messages:
    3
    Likes Received:
    0
    https://pastebin.com/UHN3AAES

    How do i down at "if (is.getItemMeta())" find out which color the stained glass is.

    I want to check if the "is.getData.whatever is == BrainStain"
    ItemStack BlackStain = new ItemStack(Material.STAINED_GLASS_PANE, 1, (byte)15);

    ^^^This itemstack is a black stained glass, and I want to check that if it isn't a black stained glass, then it's not supposted to run the code.
     
  2. it_twit

    it_twit Member

    Joined:
    Jan 26, 2017
    Messages:
    37
    Likes Received:
    3
    Medals:
    I think it's is.getData().getData() which should return the byte 15 if it's black stained glass
     
  3. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
    thats deprecated. is.getDurability()
     

Share This Page

Loading...