Class MockPotionEffectType

java.lang.Object
org.bukkit.potion.PotionEffectType
be.seeseemelk.mockbukkit.potion.MockPotionEffectType
All Implemented Interfaces:
FeatureDependant, net.kyori.adventure.key.Keyed, net.kyori.adventure.translation.Translatable, Keyed, Translatable

public class MockPotionEffectType extends PotionEffectType
This MockPotionEffectType mocks an actual PotionEffectType by taking an id, a name, whether it is instant and an RGB Color variable.
  • Constructor Details

    • MockPotionEffectType

      @Internal public MockPotionEffectType(@NotNull @NotNull NamespacedKey key, int id, @NotNull @NotNull String name, boolean instant, @NotNull @NotNull Color color, @NotNull @NotNull PotionEffectType.Category category, String translationKey)
      Parameters:
      key - The namespaced key representing this effect
      id - The magic number representing this effect
      name - The name of this effect
      instant - Whether the effect is instant or not
      color - The color of the effect
      category - The category of the effect
      translationKey - The translation key for this potion effect type
    • MockPotionEffectType

      @Deprecated(forRemoval=true) public MockPotionEffectType(@NotNull @NotNull NamespacedKey key, int id, String name, boolean instant, Color color)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a new MockPotionEffectType with the provided parameters.
      Parameters:
      key - The key of the effect type.
      id - The numerical ID of the effect type.
      name - The name of the effect type.
      instant - Whether the effect type is instantly applied.
      color - The color of the effect type.
    • MockPotionEffectType

      @Deprecated(forRemoval=true) public MockPotionEffectType(com.google.gson.JsonObject data)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      data - Json data
  • Method Details