mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
Add ability to modify ThrownPotion properties. Adds BUKKIT-3197
By: Olof Larsson <olof@sylt.nu>
This commit is contained in:
parent
66daeda328
commit
d347286b22
1 changed files with 21 additions and 0 deletions
|
@ -2,6 +2,7 @@ package org.bukkit.entity;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,4 +14,24 @@ public interface ThrownPotion extends Projectile {
|
||||||
* @return The potion effects
|
* @return The potion effects
|
||||||
*/
|
*/
|
||||||
public Collection<PotionEffect> getEffects();
|
public Collection<PotionEffect> getEffects();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a copy of the ItemStack for this thrown potion.
|
||||||
|
* <p>
|
||||||
|
* Altering this copy will not alter the thrown potion directly.
|
||||||
|
* If you want to alter the thrown potion, you must use the
|
||||||
|
* {@link #setItemStack(ItemStack) setItemStack} method.
|
||||||
|
*
|
||||||
|
* @return A copy of the ItemStack for this thrown potion.
|
||||||
|
*/
|
||||||
|
public ItemStack getItem();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the ItemStack for this thrown potion.
|
||||||
|
* <p>
|
||||||
|
* The ItemStack must be a potion, otherwise an exception is thrown.
|
||||||
|
*
|
||||||
|
* @param item New ItemStack
|
||||||
|
*/
|
||||||
|
public void setItem(ItemStack item);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue