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,org.bukkit.Keyed
public class MockPotionEffectType
extends org.bukkit.potion.PotionEffectType
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
org.bukkit.potion.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(org.bukkit.NamespacedKey key, int id, String name, boolean instant, org.bukkit.Color color) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttributeModifier(org.bukkit.attribute.Attribute attribute, org.bukkit.attribute.AttributeModifier modifier) Adds an attribute modifier to this potion effect type.booleandoublegetAttributeModifierAmount(@NotNull org.bukkit.attribute.Attribute attribute, int effectAmplifier) @NotNull org.bukkit.ColorgetColor()doubleDeprecated.@NotNull Map<org.bukkit.attribute.Attribute,org.bukkit.attribute.AttributeModifier> @NotNull org.bukkit.potion.PotionEffectType.Category@NotNull StringgetName()inthashCode()boolean@NotNull StringMethods inherited from class org.bukkit.potion.PotionEffectType
createEffect, getById, getByKey, getByName, getId, getKey, registerPotionEffectType, stopAcceptingRegistrations, toString, valuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.Keyed
key
-
Constructor Details
-
MockPotionEffectType
public MockPotionEffectType(org.bukkit.NamespacedKey key, int id, String name, boolean instant, org.bukkit.Color color)
-
-
Method Details
-
getDurationModifier
Deprecated.- Specified by:
getDurationModifierin classorg.bukkit.potion.PotionEffectType
-
getName
- Specified by:
getNamein classorg.bukkit.potion.PotionEffectType
-
isInstant
public boolean isInstant()- Specified by:
isInstantin classorg.bukkit.potion.PotionEffectType
-
getColor
@NotNull public @NotNull org.bukkit.Color getColor()- Specified by:
getColorin classorg.bukkit.potion.PotionEffectType
-
equals
- Overrides:
equalsin classorg.bukkit.potion.PotionEffectType
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.bukkit.potion.PotionEffectType
-
addAttributeModifier
public void addAttributeModifier(org.bukkit.attribute.Attribute attribute, org.bukkit.attribute.AttributeModifier modifier) Adds an attribute modifier to this potion effect type.- Parameters:
attribute- The attribute to modify.modifier- The modifier to apply.
-
getEffectAttributes
@NotNull public @NotNull Map<org.bukkit.attribute.Attribute,org.bukkit.attribute.AttributeModifier> getEffectAttributes()- Specified by:
getEffectAttributesin classorg.bukkit.potion.PotionEffectType
-
getAttributeModifierAmount
public double getAttributeModifierAmount(@NotNull @NotNull org.bukkit.attribute.Attribute attribute, int effectAmplifier) - Specified by:
getAttributeModifierAmountin classorg.bukkit.potion.PotionEffectType
-
getEffectCategory
@NotNull public @NotNull org.bukkit.potion.PotionEffectType.Category getEffectCategory()- Specified by:
getEffectCategoryin classorg.bukkit.potion.PotionEffectType
-
translationKey
-