mirror of
https://github.com/PaperMC/Paper.git
synced 2025-09-03 13:53:51 -07:00
Fix javadoc errors/warnings
By: Celtic Minstrel <celtic.minstrel.ca@some.place>
This commit is contained in:
@@ -34,6 +34,7 @@ public class Potion {
|
||||
}
|
||||
|
||||
/** @deprecated In favour of {@link #Potion(PotionType, int)} */
|
||||
@SuppressWarnings("javadoc")
|
||||
@Deprecated
|
||||
public Potion(PotionType type, Tier tier) {
|
||||
this(type, tier == Tier.TWO ? 2 : 1);
|
||||
@@ -41,12 +42,14 @@ public class Potion {
|
||||
}
|
||||
|
||||
/** @deprecated In favour of {@link #Potion(PotionType, int, boolean)} */
|
||||
@SuppressWarnings("javadoc")
|
||||
@Deprecated
|
||||
public Potion(PotionType type, Tier tier, boolean splash) {
|
||||
this(type, tier == Tier.TWO ? 2 : 1, splash);
|
||||
}
|
||||
|
||||
/** @deprecated In favour of {@link #Potion(PotionType, int, boolean, boolean)} */
|
||||
@SuppressWarnings("javadoc")
|
||||
@Deprecated
|
||||
public Potion(PotionType type, Tier tier, boolean splash, boolean extended) {
|
||||
this(type, tier, splash);
|
||||
@@ -85,7 +88,7 @@ public class Potion {
|
||||
* @param level The potion's level.
|
||||
* @param splash Whether it is a splash potion.
|
||||
* @param extended Whether it has an extended duration.
|
||||
* @deprecated In favour of using {@link #Potion(PotionType)} with {@link #extended}
|
||||
* @deprecated In favour of using {@link #Potion(PotionType)} with {@link #extend()}
|
||||
* and possibly {@link #splash()}.
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -129,8 +132,7 @@ public class Potion {
|
||||
* Applies the effects of this potion to the given {@link ItemStack}. The
|
||||
* itemstack must be a potion.
|
||||
*
|
||||
* @param to
|
||||
* The itemstack to apply to
|
||||
* @param to The itemstack to apply to
|
||||
*/
|
||||
public void apply(ItemStack to) {
|
||||
Validate.notNull(to, "itemstack cannot be null");
|
||||
@@ -143,8 +145,7 @@ public class Potion {
|
||||
* {@link LivingEntity}.
|
||||
*
|
||||
* @see LivingEntity#addPotionEffects(Collection)
|
||||
* @param to
|
||||
* The entity to apply the effects to
|
||||
* @param to The entity to apply the effects to
|
||||
*/
|
||||
public void apply(LivingEntity to) {
|
||||
Validate.notNull(to, "entity cannot be null");
|
||||
@@ -236,8 +237,7 @@ public class Potion {
|
||||
* Set whether this potion has extended duration. This will cause the potion
|
||||
* to have roughly 8/3 more duration than a regular potion.
|
||||
*
|
||||
* @param isExtended
|
||||
* Whether the potion should have extended duration
|
||||
* @param isExtended Whether the potion should have extended duration
|
||||
*/
|
||||
public void setHasExtendedDuration(boolean isExtended) {
|
||||
Validate.isTrue(type == null || !type.isInstant(), "Instant potions cannot be extended");
|
||||
@@ -258,8 +258,7 @@ public class Potion {
|
||||
/**
|
||||
* Sets the {@link Tier} of this potion.
|
||||
*
|
||||
* @param tier
|
||||
* The new tier of this potion
|
||||
* @param tier The new tier of this potion
|
||||
* @deprecated In favour of {@link #setLevel(int)}
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -281,8 +280,7 @@ public class Potion {
|
||||
/**
|
||||
* Sets the level of this potion.
|
||||
*
|
||||
* @param level
|
||||
* The new level of this potion
|
||||
* @param level The new level of this potion
|
||||
*/
|
||||
public void setLevel(int level) {
|
||||
Validate.notNull(this.type, "No-effect potions don't have a level.");
|
||||
@@ -322,8 +320,7 @@ public class Potion {
|
||||
* Converts this potion to an {@link ItemStack} with the specified amount
|
||||
* and a correct damage value.
|
||||
*
|
||||
* @param amount
|
||||
* The amount of the ItemStack
|
||||
* @param amount The amount of the ItemStack
|
||||
* @return The created ItemStack
|
||||
*/
|
||||
public ItemStack toItemStack(int amount) {
|
||||
@@ -402,8 +399,7 @@ public class Potion {
|
||||
* Sets the current instance of {@link PotionBrewer}. Generally not to be
|
||||
* used from within a plugin.
|
||||
*
|
||||
* @param other
|
||||
* The new PotionBrewer
|
||||
* @param other The new PotionBrewer
|
||||
*/
|
||||
public static void setPotionBrewer(PotionBrewer other) {
|
||||
if (brewer != null)
|
||||
|
@@ -10,12 +10,10 @@ public interface PotionBrewer {
|
||||
* Creates a {@link PotionEffect} from the given {@link PotionEffectType},
|
||||
* applying duration modifiers and checks.
|
||||
*
|
||||
* @param potion
|
||||
* The type of potion
|
||||
* @param duration
|
||||
* The duration in ticks
|
||||
* @param amplifier
|
||||
* The amplifier of the effect
|
||||
* @param potion The type of potion
|
||||
* @param duration The duration in ticks
|
||||
* @param amplifier The amplifier of the effect
|
||||
* @return The resulting potion effect
|
||||
*/
|
||||
public PotionEffect createEffect(PotionEffectType potion, int duration, int amplifier);
|
||||
|
||||
@@ -23,9 +21,8 @@ public interface PotionBrewer {
|
||||
* Returns a collection of {@link PotionEffect} that would be applied from a
|
||||
* potion with the given data value.
|
||||
*
|
||||
* @param damage
|
||||
* The data value of the potion
|
||||
* @return
|
||||
* @param damage The data value of the potion
|
||||
* @return The list of effects
|
||||
*/
|
||||
public Collection<PotionEffect> getEffectsFromDamage(int damage);
|
||||
}
|
||||
|
@@ -26,8 +26,8 @@ public class PotionEffect {
|
||||
* {@link LivingEntity}.
|
||||
*
|
||||
* @see LivingEntity#addPotionEffect(PotionEffect)
|
||||
* @param entity
|
||||
* The entity to add this effect to
|
||||
* @param entity The entity to add this effect to
|
||||
* @return Whether the effect could be added
|
||||
*/
|
||||
public boolean apply(LivingEntity entity) {
|
||||
return entity.addPotionEffect(this);
|
||||
@@ -56,6 +56,7 @@ public class PotionEffect {
|
||||
* Returns the amplifier of this effect. A higher amplifier means the potion
|
||||
* effect happens more often over its duration and in some cases has more
|
||||
* effect on its target.
|
||||
* @return The effect amplifier
|
||||
*/
|
||||
public int getAmplifier() {
|
||||
return amplifier;
|
||||
@@ -64,6 +65,7 @@ public class PotionEffect {
|
||||
/**
|
||||
* Returns the duration (in ticks) that this effect will run for when
|
||||
* applied to a {@link LivingEntity}.
|
||||
* @return The duration of the effect
|
||||
*/
|
||||
public int getDuration() {
|
||||
return duration;
|
||||
|
@@ -86,7 +86,7 @@ public abstract class PotionEffectType {
|
||||
public static final PotionEffectType BLINDNESS = new PotionEffectTypeWrapper(15);
|
||||
|
||||
/**
|
||||
* Allows an entity to see in the dark. NOTE: Unusable due to not being
|
||||
* Allows an entity to see in the dark. NOTE: Unusable due to not being
|
||||
* implemented by Minecraft.
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -180,8 +180,7 @@ public abstract class PotionEffectType {
|
||||
/**
|
||||
* Gets the effect type specified by the unique id.
|
||||
*
|
||||
* @param id
|
||||
* Unique ID to fetch
|
||||
* @param id Unique ID to fetch
|
||||
* @return Resulting type, or null if not found.
|
||||
*/
|
||||
public static PotionEffectType getById(int id) {
|
||||
@@ -193,8 +192,7 @@ public abstract class PotionEffectType {
|
||||
/**
|
||||
* Gets the effect type specified by the given name.
|
||||
*
|
||||
* @param name
|
||||
* Name of PotionEffectType to fetch
|
||||
* @param name Name of PotionEffectType to fetch
|
||||
* @return Resulting PotionEffectType, or null if not found.
|
||||
*/
|
||||
public static PotionEffectType getByName(String name) {
|
||||
@@ -207,8 +205,7 @@ public abstract class PotionEffectType {
|
||||
* <p>
|
||||
* Generally not to be used from within a plugin.
|
||||
*
|
||||
* @param potionType
|
||||
* PotionType to register
|
||||
* @param type PotionType to register
|
||||
*/
|
||||
public static void registerPotionEffectType(PotionEffectType type) {
|
||||
if (byId[type.id] != null || byName.containsKey(type.getName().toLowerCase())) {
|
||||
|
@@ -17,6 +17,7 @@ public class PotionEffectTypeWrapper extends PotionEffectType {
|
||||
|
||||
/**
|
||||
* Get the potion type bound to this wrapper.
|
||||
* @return The potion effect type
|
||||
*/
|
||||
public PotionEffectType getType() {
|
||||
return PotionEffectType.getById(getId());
|
||||
|
Reference in New Issue
Block a user