Water Bottle ItemStack?

Discussion in 'Plugin Development' started by MrGiGimz, Jun 12, 2014.

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

    MrGiGimz

    Hello. SO i have this:

    Code:java
    1. ItemStack bottle = new ItemStack(Material.POTION);


    how do i make the potion a water bottle? any help would be great!
     
  2. Offline

    Garris0n

    By...not making it a potion?

    The Material is GLASS_BOTTLE, if that's what you mean.
     
  3. Offline

    GeorgeeeHD

    MrGiGimz bottle.setFilled(false); obviously...
     
  4. Offline

    PocketMines

    Wrong, a water bottle uses the potion ID with a data value of 0 I believe.
     
  5. Offline

    nopvpgamer

    You have to use byte
    Example:
    Code:java
    1. //ItemStack name = new ItemStack(Material.MATERIAL, AMOUNT, (byte)0);
    2. // (byte)0 = normal potion (waterbottle)
    3. ItemStack bottle = new ItemStack(Material.POTION, 1, (byte)0);
     
Thread Status:
Not open for further replies.

Share This Page