Class DynamaxCandyEvent

java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.DynamaxCandyEvent
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent

public class DynamaxCandyEvent extends net.neoforged.bus.api.Event implements net.neoforged.bus.api.ICancellableEvent
Event fires whenever a Dynamax Candy is attempted to be used on a Pokémon. This event will only fire if they are capable of taking a Dynamax Candy (Dynamax Level less than 10). Canceling this event will prevent the interaction from both raising the Dynamax Level of the Pokémon and also from consuming the item.
  • Field Details

    • pixelmon

      public PixelmonEntity pixelmon
      The Pokémon the Dynamax Candy is being used on
    • player

      public net.minecraft.server.level.ServerPlayer player
      The player using the Dynamax Candy
  • Constructor Details

    • DynamaxCandyEvent

      public DynamaxCandyEvent(net.minecraft.server.level.ServerPlayer player, PixelmonEntity pixelmon)