geforkt von Mirrors/Paper
#1014: Add PotionEffectTypeCategory to distinguish between beneficial and harmful effects
By: 2008Choco <hawkeboyz2@hotmail.com>
Dieser Commit ist enthalten in:
Ursprung
ce747e1973
Commit
2642e438f0
@ -249,6 +249,14 @@ public abstract class PotionEffectType implements Keyed, Translatable {
|
|||||||
*/
|
*/
|
||||||
public abstract boolean isInstant();
|
public abstract boolean isInstant();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the {@link PotionEffectTypeCategory category} of this effect type.
|
||||||
|
*
|
||||||
|
* @return the category
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
public abstract PotionEffectTypeCategory getCategory();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the color of this effect type.
|
* Returns the color of this effect type.
|
||||||
*
|
*
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
package org.bukkit.potion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a category of {@link PotionEffectType} and its effect on an entity.
|
||||||
|
*/
|
||||||
|
public enum PotionEffectTypeCategory {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Beneficial effects that positively impact an entity, such as Regeneration,
|
||||||
|
* Absorption, or Fire Resistance.
|
||||||
|
*/
|
||||||
|
BENEFICIAL,
|
||||||
|
/**
|
||||||
|
* Harmful effects that negatively impact an entity, such as Blindness, Wither,
|
||||||
|
* or Levitation.
|
||||||
|
*/
|
||||||
|
HARMFUL,
|
||||||
|
/**
|
||||||
|
* Neutral effects that have neither a positive nor negative effect on an
|
||||||
|
* entity, such as Glowing or Bad Omen.
|
||||||
|
*/
|
||||||
|
NEUTRAL;
|
||||||
|
|
||||||
|
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren