Class RibbonEvent.ReceiveRibbon.Pre
java.lang.Object
net.neoforged.bus.api.Event
com.pixelmonmod.pixelmon.api.pokemon.ribbon.event.RibbonEvent
com.pixelmonmod.pixelmon.api.pokemon.ribbon.event.RibbonEvent.ReceiveRibbon
com.pixelmonmod.pixelmon.api.pokemon.ribbon.event.RibbonEvent.ReceiveRibbon.Pre
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
RibbonEvent.ReceiveRibbon
public static class RibbonEvent.ReceiveRibbon.Pre
extends RibbonEvent.ReceiveRibbon
implements net.neoforged.bus.api.ICancellableEvent
Fired just before the ribbon is given
Here you can modify the ribbon given, or if it will be set as the display ribbon
Cancelling this will prevent the ribbon being given or displayed
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.pokemon.ribbon.event.RibbonEvent.ReceiveRibbon
RibbonEvent.ReceiveRibbon.Post, RibbonEvent.ReceiveRibbon.PreNested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.pokemon.ribbon.event.RibbonEvent
RibbonEvent.ReceiveRibbon, RibbonEvent.RemoveRibbon, RibbonEvent.SetDisplayedRibbon -
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.api.pokemon.ribbon.event.RibbonEvent.ReceiveRibbon
shouldDisplayFields inherited from class com.pixelmonmod.pixelmon.api.pokemon.ribbon.event.RibbonEvent
pokemon, ribbon -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSets the ribbon being givenvoidsetShouldDisplay(boolean shouldDisplay) Sets if the ribbon should be set as the displayed ribbon for the PokemonMethods inherited from class com.pixelmonmod.pixelmon.api.pokemon.ribbon.event.RibbonEvent.ReceiveRibbon
isShouldDisplayMethods inherited from class com.pixelmonmod.pixelmon.api.pokemon.ribbon.event.RibbonEvent
getPokemon, getRibbonMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Constructor Details
-
Pre
-
-
Method Details
-
setRibbon
Sets the ribbon being given- Parameters:
ribbon- The ribbon given
-
setShouldDisplay
public void setShouldDisplay(boolean shouldDisplay) Sets if the ribbon should be set as the displayed ribbon for the Pokemon- Parameters:
shouldDisplay- The display
-