Package be.seeseemelk.mockbukkit.potion
Class MockPotionEffectType
java.lang.Object
org.bukkit.potion.PotionEffectType
be.seeseemelk.mockbukkit.potion.MockPotionEffectType
- All Implemented Interfaces:
net.kyori.adventure.key.Keyed,net.kyori.adventure.translation.Translatable,Keyed
This
MockPotionEffectType mocks an actual PotionEffectType by taking an id, a name, whether it is
instant and a RGB Color variable.-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.potion.PotionEffectType
PotionEffectType.Category -
Field Summary
Fields inherited from class org.bukkit.potion.PotionEffectType
ABSORPTION, BAD_OMEN, BLINDNESS, CONDUIT_POWER, CONFUSION, DAMAGE_RESISTANCE, DARKNESS, DOLPHINS_GRACE, FAST_DIGGING, FIRE_RESISTANCE, GLOWING, HARM, HEAL, HEALTH_BOOST, HERO_OF_THE_VILLAGE, HUNGER, INCREASE_DAMAGE, INVISIBILITY, JUMP, LEVITATION, LUCK, NIGHT_VISION, POISON, REGENERATION, SATURATION, SLOW, SLOW_DIGGING, SLOW_FALLING, SPEED, UNLUCK, WATER_BREATHING, WEAKNESS, WITHER -
Constructor Summary
ConstructorsConstructorDescriptionMockPotionEffectType(@NotNull NamespacedKey key, int id, String name, boolean instant, Color color) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttributeModifier(Attribute attribute, AttributeModifier modifier) Adds an attribute modifier to this potion effect type.booleandoublegetAttributeModifierAmount(@NotNull Attribute attribute, int effectAmplifier) @NotNull ColorgetColor()doubleDeprecated.@NotNull Map<Attribute,AttributeModifier> @NotNull PotionEffectType.Category@NotNull StringgetName()inthashCode()boolean@NotNull StringMethods inherited from class org.bukkit.potion.PotionEffectType
createEffect, getById, getByKey, getByName, getId, getKey, registerPotionEffectType, stopAcceptingRegistrations, toString, values
-
Constructor Details
-
MockPotionEffectType
public MockPotionEffectType(@NotNull @NotNull NamespacedKey key, int id, String name, boolean instant, Color color)
-
-
Method Details
-
getDurationModifier
Deprecated.- Specified by:
getDurationModifierin classPotionEffectType
-
getName
- Specified by:
getNamein classPotionEffectType
-
isInstant
public boolean isInstant()- Specified by:
isInstantin classPotionEffectType
-
getColor
- Specified by:
getColorin classPotionEffectType
-
equals
- Overrides:
equalsin classPotionEffectType
-
hashCode
public int hashCode()- Overrides:
hashCodein classPotionEffectType
-
addAttributeModifier
Adds an attribute modifier to this potion effect type.- Parameters:
attribute- The attribute to modify.modifier- The modifier to apply.
-
getEffectAttributes
- Specified by:
getEffectAttributesin classPotionEffectType
-
getAttributeModifierAmount
public double getAttributeModifierAmount(@NotNull @NotNull Attribute attribute, int effectAmplifier) - Specified by:
getAttributeModifierAmountin classPotionEffectType
-
getEffectCategory
- Specified by:
getEffectCategoryin classPotionEffectType
-
translationKey
-