PotionEffectTypeWrapper
public abstract class PotionEffectType
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static PotionEffectType |
ABSORPTION |
Increases the maximum health of an entity with health that cannot be
regenerated, but is refilled every 30 seconds.
|
static PotionEffectType |
BLINDNESS |
Blinds an entity.
|
static PotionEffectType |
CONFUSION |
Warps vision on the client.
|
static PotionEffectType |
DAMAGE_RESISTANCE |
Decreases damage dealt to an entity.
|
static PotionEffectType |
FAST_DIGGING |
Increases dig speed.
|
static PotionEffectType |
FIRE_RESISTANCE |
Stops fire damage.
|
static PotionEffectType |
GLOWING |
Outlines the entity so that it can be seen from afar.
|
static PotionEffectType |
HARM |
Hurts an entity.
|
static PotionEffectType |
HEAL |
Heals an entity.
|
static PotionEffectType |
HEALTH_BOOST |
Increases the maximum health of an entity.
|
static PotionEffectType |
HUNGER |
Increases hunger.
|
static PotionEffectType |
INCREASE_DAMAGE |
Increases damage dealt.
|
static PotionEffectType |
INVISIBILITY |
Grants invisibility.
|
static PotionEffectType |
JUMP |
Increases jump height.
|
static PotionEffectType |
LEVITATION |
Causes the entity to float into the air.
|
static PotionEffectType |
LUCK |
Loot table luck.
|
static PotionEffectType |
NIGHT_VISION |
Allows an entity to see in the dark.
|
static PotionEffectType |
POISON |
Deals damage to an entity over time.
|
static PotionEffectType |
REGENERATION |
Regenerates health.
|
static PotionEffectType |
SATURATION |
Increases the food level of an entity each tick.
|
static PotionEffectType |
SLOW |
Decreases movement speed.
|
static PotionEffectType |
SLOW_DIGGING |
Decreases dig speed.
|
static PotionEffectType |
SPEED |
Increases movement speed.
|
static PotionEffectType |
UNLUCK |
Loot table unluck.
|
static PotionEffectType |
WATER_BREATHING |
Allows breathing underwater.
|
static PotionEffectType |
WEAKNESS |
Decreases damage dealt by an entity.
|
static PotionEffectType |
WITHER |
Deals damage to an entity over time and gives the health to the
shooter.
|
Modifier | Constructor | Description |
---|---|---|
protected |
PotionEffectType(int id) |
Modifier and Type | Method | Description |
---|---|---|
PotionEffect |
createEffect(int duration,
int amplifier) |
Creates a PotionEffect from this PotionEffectType, applying duration
modifiers and checks.
|
boolean |
equals(java.lang.Object obj) |
|
static PotionEffectType |
getById(int id) |
Deprecated.
Magic value
|
static PotionEffectType |
getByName(java.lang.String name) |
Gets the effect type specified by the given name.
|
abstract Color |
getColor() |
Returns the color of this effect type.
|
abstract double |
getDurationModifier() |
Returns the duration modifier applied to effects of this type.
|
int |
getId() |
Deprecated.
Magic value
|
abstract java.lang.String |
getName() |
Returns the name of this effect type.
|
int |
hashCode() |
|
abstract boolean |
isInstant() |
Returns whether the effect of this type happens once, immediately.
|
static void |
registerPotionEffectType(PotionEffectType type) |
Registers an effect type with the given object.
|
static void |
stopAcceptingRegistrations() |
Stops accepting any effect type registrations.
|
java.lang.String |
toString() |
|
static PotionEffectType[] |
values() |
Returns an array of all the registered
PotionEffectType s. |
public static final PotionEffectType SPEED
public static final PotionEffectType SLOW
public static final PotionEffectType FAST_DIGGING
public static final PotionEffectType SLOW_DIGGING
public static final PotionEffectType INCREASE_DAMAGE
public static final PotionEffectType HEAL
public static final PotionEffectType HARM
public static final PotionEffectType JUMP
public static final PotionEffectType CONFUSION
public static final PotionEffectType REGENERATION
public static final PotionEffectType DAMAGE_RESISTANCE
public static final PotionEffectType FIRE_RESISTANCE
public static final PotionEffectType WATER_BREATHING
public static final PotionEffectType INVISIBILITY
public static final PotionEffectType BLINDNESS
public static final PotionEffectType NIGHT_VISION
public static final PotionEffectType HUNGER
public static final PotionEffectType WEAKNESS
public static final PotionEffectType POISON
public static final PotionEffectType WITHER
public static final PotionEffectType HEALTH_BOOST
public static final PotionEffectType ABSORPTION
public static final PotionEffectType SATURATION
public static final PotionEffectType GLOWING
public static final PotionEffectType LEVITATION
public static final PotionEffectType LUCK
public static final PotionEffectType UNLUCK
public PotionEffect createEffect(int duration, int amplifier)
duration
- time in ticksamplifier
- the effect's amplifierPotionBrewer.createEffect(PotionEffectType, int, int)
public abstract double getDurationModifier()
@Deprecated public int getId()
public abstract java.lang.String getName()
public abstract boolean isInstant()
public abstract Color getColor()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
@Deprecated public static PotionEffectType getById(int id)
id
- Unique ID to fetchpublic static PotionEffectType getByName(java.lang.String name)
name
- Name of PotionEffectType to fetchpublic static void registerPotionEffectType(PotionEffectType type)
Generally not to be used from within a plugin.
type
- PotionType to registerpublic static void stopAcceptingRegistrations()
public static PotionEffectType[] values()
PotionEffectType
s.
This array is not necessarily in any particular order and may contain null.Copyright © 2018. All rights reserved.