Potion ID

Discussion in 'Plugin Development' started by xELI7E_SNIPEZx, Oct 19, 2013.

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

    xELI7E_SNIPEZx

    What would be the code for a instant health 2 (SPLASH ) potion?
     
  2. Offline

    Sweatyyyy

    xELI7E_SNIPEZx
    I think you do this:
    Code:
    ItemStack potion = new ItemStack(Material.POTION);
    potion.setDurability(16421);
    
     
  3. Offline

    xELI7E_SNIPEZx

    Ty will try it now

    nope

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  4. Offline

    Aengo

    That should work.. Meh if it doesn't try this:
    Code:java
    1. private static ItemStack createPotion(short data, int amount){
    2. ItemStack i = new ItemStack(Material.POTION, amount);
    3. i.setDurability(data);
    4. return i;
    5. }

    Call it by doing:
    Code:java
    1. ItemStack yourpotion = createPotion(16421, 1);
     
  5. Offline

    Sweatyyyy

    Aengo
    I will look forward to your CraftRune plugin as I used to play RuneScape xD!
     
    Aengo likes this.
  6. Offline

    xELI7E_SNIPEZx

    Ok TY will try now
     
Thread Status:
Not open for further replies.

Share This Page