![]() |
Bukkit
1.4.7-R1.0
|
Represents a type of potion and its effect on an entity. More...
Inheritance diagram for org.bukkit.potion.PotionEffectType:
Collaboration diagram for org.bukkit.potion.PotionEffectType:Public Member Functions | |
| PotionEffect | createEffect (int duration, int amplifier) |
| Creates a PotionEffect from this PotionEffectType, applying duration modifiers and checks. | |
| abstract double | getDurationModifier () |
| Returns the duration modifier applied to effects of this type. | |
| int | getId () |
| Returns the unique ID of this type. | |
| abstract String | getName () |
| Returns the name of this effect type. | |
| abstract boolean | isInstant () |
| Returns whether the effect of this type happens once, immediately. | |
| boolean | equals (Object obj) |
| int | hashCode () |
| String | toString () |
Static Public Member Functions | |
| static PotionEffectType | getById (int id) |
| Gets the effect type specified by the unique id. | |
| static PotionEffectType | getByName (String name) |
| Gets the effect type specified by the given name. | |
| static void | registerPotionEffectType (PotionEffectType type) |
| Registers an effect type with the given object. | |
| static void | stopAcceptingRegistrations () |
| Stops accepting any effect type registrations. | |
| static PotionEffectType[] | values () |
| Returns an array of all the registered PotionEffectTypes. | |
Static Public Attributes | |
| static final PotionEffectType | SPEED = new PotionEffectTypeWrapper(1) |
| Increases movement speed. | |
| static final PotionEffectType | SLOW = new PotionEffectTypeWrapper(2) |
| Decreases movement speed. | |
| static final PotionEffectType | FAST_DIGGING = new PotionEffectTypeWrapper(3) |
| Increases dig speed. | |
| static final PotionEffectType | SLOW_DIGGING = new PotionEffectTypeWrapper(4) |
| Decreases dig speed. | |
| static final PotionEffectType | INCREASE_DAMAGE = new PotionEffectTypeWrapper(5) |
| Increases damage dealt. | |
| static final PotionEffectType | HEAL = new PotionEffectTypeWrapper(6) |
| Heals an entity. | |
| static final PotionEffectType | HARM = new PotionEffectTypeWrapper(7) |
| Hurts an entity. | |
| static final PotionEffectType | JUMP = new PotionEffectTypeWrapper(8) |
| Increases jump height. | |
| static final PotionEffectType | CONFUSION = new PotionEffectTypeWrapper(9) |
| Warps vision on the client. | |
| static final PotionEffectType | REGENERATION = new PotionEffectTypeWrapper(10) |
| Regenerates health. | |
| static final PotionEffectType | DAMAGE_RESISTANCE = new PotionEffectTypeWrapper(11) |
| Decreases damage dealt to an entity. | |
| static final PotionEffectType | FIRE_RESISTANCE = new PotionEffectTypeWrapper(12) |
| Stops fire damage. | |
| static final PotionEffectType | WATER_BREATHING = new PotionEffectTypeWrapper(13) |
| Allows breathing underwater. | |
| static final PotionEffectType | INVISIBILITY = new PotionEffectTypeWrapper(14) |
| Grants invisibility. | |
| static final PotionEffectType | BLINDNESS = new PotionEffectTypeWrapper(15) |
| Blinds an entity. | |
| static final PotionEffectType | NIGHT_VISION = new PotionEffectTypeWrapper(16) |
| Allows an entity to see in the dark. | |
| static final PotionEffectType | HUNGER = new PotionEffectTypeWrapper(17) |
| Increases hunger. | |
| static final PotionEffectType | WEAKNESS = new PotionEffectTypeWrapper(18) |
| Decreases damage dealt by an entity. | |
| static final PotionEffectType | POISON = new PotionEffectTypeWrapper(19) |
| Deals damage to an entity over time. | |
| static final PotionEffectType | WITHER = new PotionEffectTypeWrapper(20) |
| Deals damage to an entity over time and gives the health to the shooter. | |
Protected Member Functions | |
| PotionEffectType (int id) | |
Represents a type of potion and its effect on an entity.
Definition at line 11 of file PotionEffectType.java.
|
protected |
Definition at line 114 of file PotionEffectType.java.
Referenced by org.bukkit.potion.PotionEffectType.equals().
| PotionEffect org.bukkit.potion.PotionEffectType.createEffect | ( | int | duration, |
| int | amplifier | ||
| ) |
Creates a PotionEffect from this PotionEffectType, applying duration modifiers and checks.
| duration | time in ticks |
| amplifier | the effect's amplifier |
Definition at line 126 of file PotionEffectType.java.
References org.bukkit.potion.PotionBrewer.createEffect(), and org.bukkit.potion.Potion.getBrewer().
| boolean org.bukkit.potion.PotionEffectType.equals | ( | Object | obj | ) |
Definition at line 161 of file PotionEffectType.java.
References org.bukkit.potion.PotionEffectType.PotionEffectType().
Referenced by org.bukkit.potion.PotionType.getByEffect().
|
static |
Gets the effect type specified by the unique id.
| id | Unique ID to fetch |
Definition at line 196 of file PotionEffectType.java.
Referenced by org.bukkit.potion.PotionEffectTypeWrapper.getType().
|
static |
Gets the effect type specified by the given name.
| name | Name of PotionEffectType to fetch |
Definition at line 208 of file PotionEffectType.java.
|
pure virtual |
Returns the duration modifier applied to effects of this type.
Implemented in org.bukkit.potion.PotionEffectTypeWrapper.
Referenced by org.bukkit.potion.PotionEffectTypeWrapper.getDurationModifier().
| int org.bukkit.potion.PotionEffectType.getId | ( | ) |
Returns the unique ID of this type.
Definition at line 142 of file PotionEffectType.java.
Referenced by org.bukkit.potion.PotionEffectTypeWrapper.getType().
|
pure virtual |
Returns the name of this effect type.
Implemented in org.bukkit.potion.PotionEffectTypeWrapper.
Referenced by org.bukkit.potion.PotionEffectTypeWrapper.getName(), org.bukkit.potion.PotionEffectType.registerPotionEffectType(), and org.bukkit.potion.PotionEffectType.toString().
| int org.bukkit.potion.PotionEffectType.hashCode | ( | ) |
Definition at line 176 of file PotionEffectType.java.
|
pure virtual |
Returns whether the effect of this type happens once, immediately.
Implemented in org.bukkit.potion.PotionEffectTypeWrapper.
Referenced by org.bukkit.potion.PotionEffectTypeWrapper.isInstant(), and org.bukkit.potion.PotionType.isInstant().
|
static |
Registers an effect type with the given object.
Generally not to be used from within a plugin.
| type | PotionType to register |
Definition at line 220 of file PotionEffectType.java.
References org.bukkit.potion.PotionEffectType.getName().
|
static |
Stops accepting any effect type registrations.
Definition at line 235 of file PotionEffectType.java.
| String org.bukkit.potion.PotionEffectType.toString | ( | ) |
Definition at line 181 of file PotionEffectType.java.
References org.bukkit.potion.PotionEffectType.getName().
|
static |
Returns an array of all the registered PotionEffectTypes.
Definition at line 244 of file PotionEffectType.java.
|
static |
Blinds an entity.
Definition at line 85 of file PotionEffectType.java.
|
static |
Warps vision on the client.
Definition at line 55 of file PotionEffectType.java.
|
static |
Decreases damage dealt to an entity.
Definition at line 65 of file PotionEffectType.java.
|
static |
Increases dig speed.
Definition at line 25 of file PotionEffectType.java.
|
static |
Stops fire damage.
Definition at line 70 of file PotionEffectType.java.
|
static |
Hurts an entity.
Definition at line 45 of file PotionEffectType.java.
|
static |
Heals an entity.
Definition at line 40 of file PotionEffectType.java.
|
static |
Increases hunger.
Definition at line 95 of file PotionEffectType.java.
|
static |
Increases damage dealt.
Definition at line 35 of file PotionEffectType.java.
|
static |
Grants invisibility.
Definition at line 80 of file PotionEffectType.java.
|
static |
Increases jump height.
Definition at line 50 of file PotionEffectType.java.
|
static |
Allows an entity to see in the dark.
Definition at line 90 of file PotionEffectType.java.
|
static |
Deals damage to an entity over time.
Definition at line 105 of file PotionEffectType.java.
|
static |
Regenerates health.
Definition at line 60 of file PotionEffectType.java.
|
static |
Decreases movement speed.
Definition at line 20 of file PotionEffectType.java.
|
static |
Decreases dig speed.
Definition at line 30 of file PotionEffectType.java.
|
static |
Increases movement speed.
Definition at line 15 of file PotionEffectType.java.
|
static |
Allows breathing underwater.
Definition at line 75 of file PotionEffectType.java.
|
static |
Decreases damage dealt by an entity.
Definition at line 100 of file PotionEffectType.java.
|
static |
Deals damage to an entity over time and gives the health to the shooter.
Definition at line 110 of file PotionEffectType.java.