001 package org.bukkit.entity;
002
003 import java.util.Collection;
004
005 import org.bukkit.inventory.ItemStack;
006 import org.bukkit.potion.PotionEffect;
007
008 /**
009 * Represents a thrown potion bottle
010 */
011 public interface ThrownPotion extends Projectile {
012
013 /**
014 * Returns the effects that are applied by this potion.
015 *
016 * @return The potion effects
017 */
018 public Collection<PotionEffect> getEffects();
019
020 /**
021 * Returns a copy of the ItemStack for this thrown potion.
022 * <p>
023 * Altering this copy will not alter the thrown potion directly. If you
024 * want to alter the thrown potion, you must use the {@link
025 * #setItem(ItemStack) setItemStack} method.
026 *
027 * @return A copy of the ItemStack for this thrown potion.
028 */
029 public ItemStack getItem();
030
031 /**
032 * Set the ItemStack for this thrown potion.
033 * <p>
034 * The ItemStack must be a potion, otherwise an exception is thrown.
035 *
036 * @param item New ItemStack
037 */
038 public void setItem(ItemStack item);
039 }