Class RareCandyEvent
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.events.RareCandyEvent
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
public class RareCandyEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.bus.api.ICancellableEvent
Event fires whenever a rare candy is attempted to be used on a Pokémon. This event will only fire if they are below pokemonLevel 100 have leveling
turned on. Canceling this event will prevent the interaction from both leveling the Pokémon and also from consuming the item.
-
Constructor Summary
ConstructorsConstructorDescriptionRareCandyEvent
(net.minecraft.server.level.ServerPlayer player, PixelmonEntity pixelmon, net.minecraft.world.item.ItemStack usedItem, ExpCandyItem usedCandy) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.server.level.ServerPlayer
net.minecraft.world.item.ItemStack
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Constructor Details
-
RareCandyEvent
public RareCandyEvent(net.minecraft.server.level.ServerPlayer player, PixelmonEntity pixelmon, net.minecraft.world.item.ItemStack usedItem, ExpCandyItem usedCandy)
-
-
Method Details
-
getPixelmon
-
getPlayer
public net.minecraft.server.level.ServerPlayer getPlayer() -
getUsedCandy
-
getUsedItem
public net.minecraft.world.item.ItemStack getUsedItem()
-