@@ -117,8 +117,8 @@ public class Potion {
|
||||
* Applies the effects that would be applied by this potion to the given
|
||||
* {@link LivingEntity}.
|
||||
*
|
||||
* @see LivingEntity#addPotionEffects(Collection)
|
||||
* @param to The entity to apply the effects to
|
||||
* @see LivingEntity#addPotionEffects(Collection)
|
||||
*/
|
||||
public void apply(@NotNull LivingEntity to) {
|
||||
Validate.notNull(to, "entity cannot be null");
|
||||
@@ -281,6 +281,7 @@ public class Potion {
|
||||
private static final int TIER_SHIFT = 5;
|
||||
|
||||
/**
|
||||
* Gets the potion from its damage value.
|
||||
*
|
||||
* @param damage the damage value
|
||||
* @return the produced potion
|
||||
@@ -382,6 +383,7 @@ public class Potion {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the potion from its name id.
|
||||
*
|
||||
* @return the name id
|
||||
* @deprecated Non-functional
|
||||
|
||||
@@ -144,9 +144,9 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
* Attempts to add the effect represented by this object to the given
|
||||
* {@link LivingEntity}.
|
||||
*
|
||||
* @see LivingEntity#addPotionEffect(PotionEffect)
|
||||
* @param entity The entity to add this effect to
|
||||
* @return Whether the effect could be added
|
||||
* @see LivingEntity#addPotionEffect(PotionEffect)
|
||||
*/
|
||||
public boolean apply(@NotNull LivingEntity entity) {
|
||||
return entity.addPotionEffect(this);
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Classes to represent various {@link org.bukkit.Material#POTION potion}
|
||||
* properties and manipulation.
|
||||
*/
|
||||
package org.bukkit.potion;
|
||||
|
||||
Reference in New Issue
Block a user