类 PotionEffectType
java.lang.Object
org.bukkit.potion.PotionEffectType
- 直接已知子类:
PotionEffectTypeWrapper
Represents a type of potion and its effect on an entity.
-
字段概要
字段修饰符和类型字段说明static final PotionEffectTypeIncreases the maximum health of an entity with health that cannot be regenerated, but is refilled every 30 seconds.static final PotionEffectTypeBlinds an entity.static final PotionEffectTypeWarps vision on the client.static final PotionEffectTypeDecreases damage dealt to an entity.static final PotionEffectTypeIncreases dig speed.static final PotionEffectTypeStops fire damage.static final PotionEffectTypeOutlines the entity so that it can be seen from afar.static final PotionEffectTypeHurts an entity.static final PotionEffectTypeHeals an entity.static final PotionEffectTypeIncreases the maximum health of an entity.static final PotionEffectTypeIncreases hunger.static final PotionEffectTypeIncreases damage dealt.static final PotionEffectTypeGrants invisibility.static final PotionEffectTypeIncreases jump height.static final PotionEffectTypeCauses the entity to float into the air.static final PotionEffectTypeLoot table luck.static final PotionEffectTypeAllows an entity to see in the dark.static final PotionEffectTypeDeals damage to an entity over time.static final PotionEffectTypeRegenerates health.static final PotionEffectTypeIncreases the food level of an entity each tick.static final PotionEffectTypeDecreases movement speed.static final PotionEffectTypeDecreases dig speed.static final PotionEffectTypeIncreases movement speed.static final PotionEffectTypeLoot table unluck.static final PotionEffectTypeAllows breathing underwater.static final PotionEffectTypeDecreases damage dealt by an entity.static final PotionEffectTypeDeals damage to an entity over time and gives the health to the shooter. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明createEffect(int duration, int amplifier) Creates a PotionEffect from this PotionEffectType, applying duration modifiers and checks.booleanstatic PotionEffectTypegetById(int id) 已过时。Magic valuestatic PotionEffectTypeGets the effect type specified by the given name.abstract ColorgetColor()Returns the color of this effect type.abstract doubleReturns the duration modifier applied to effects of this type.intgetId()已过时。Magic valueabstract StringgetName()Returns the name of this effect type.inthashCode()abstract booleanReturns whether the effect of this type happens once, immediately.static voidRegisters an effect type with the given object.static voidStops accepting any effect type registrations.toString()static PotionEffectType[]values()Returns an array of all the registeredPotionEffectTypes.
-
字段详细资料
-
SPEED
Increases movement speed. -
SLOW
Decreases movement speed. -
FAST_DIGGING
Increases dig speed. -
SLOW_DIGGING
Decreases dig speed. -
INCREASE_DAMAGE
Increases damage dealt. -
HEAL
Heals an entity. -
HARM
Hurts an entity. -
JUMP
Increases jump height. -
CONFUSION
Warps vision on the client. -
REGENERATION
Regenerates health. -
DAMAGE_RESISTANCE
Decreases damage dealt to an entity. -
FIRE_RESISTANCE
Stops fire damage. -
WATER_BREATHING
Allows breathing underwater. -
INVISIBILITY
Grants invisibility. -
BLINDNESS
Blinds an entity. -
NIGHT_VISION
Allows an entity to see in the dark. -
HUNGER
Increases hunger. -
WEAKNESS
Decreases damage dealt by an entity. -
POISON
Deals damage to an entity over time. -
WITHER
Deals damage to an entity over time and gives the health to the shooter. -
HEALTH_BOOST
Increases the maximum health of an entity. -
ABSORPTION
Increases the maximum health of an entity with health that cannot be regenerated, but is refilled every 30 seconds. -
SATURATION
Increases the food level of an entity each tick. -
GLOWING
Outlines the entity so that it can be seen from afar. -
LEVITATION
Causes the entity to float into the air. -
LUCK
Loot table luck. -
UNLUCK
Loot table unluck.
-
-
构造器详细资料
-
PotionEffectType
protected PotionEffectType(int id)
-
-
方法详细资料
-
createEffect
Creates a PotionEffect from this PotionEffectType, applying duration modifiers and checks.- 参数:
duration- time in ticksamplifier- the effect's amplifier- 返回:
- a resulting potion effect
- 另请参阅:
-
getDurationModifier
public abstract double getDurationModifier()Returns the duration modifier applied to effects of this type.- 返回:
- duration modifier
-
getId
已过时。Magic valueReturns the unique ID of this type.- 返回:
- Unique ID
-
getName
Returns the name of this effect type.- 返回:
- The name of this effect type
-
isInstant
public abstract boolean isInstant()Returns whether the effect of this type happens once, immediately.- 返回:
- whether this type is normally instant
-
getColor
Returns the color of this effect type.- 返回:
- the color
-
equals
-
hashCode
public int hashCode() -
toString
-
getById
已过时。Magic valueGets the effect type specified by the unique id.- 参数:
id- Unique ID to fetch- 返回:
- Resulting type, or null if not found.
-
getByName
Gets the effect type specified by the given name.- 参数:
name- Name of PotionEffectType to fetch- 返回:
- Resulting PotionEffectType, or null if not found.
-
registerPotionEffectType
Registers an effect type with the given object.Generally not to be used from within a plugin.
- 参数:
type- PotionType to register
-
stopAcceptingRegistrations
public static void stopAcceptingRegistrations()Stops accepting any effect type registrations. -
values
Returns an array of all the registeredPotionEffectTypes. This array is not necessarily in any particular order and may contain null.- 返回:
- Array of types.
-