Class ThrowPokeballEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.ThrowPokeballEvent
public class ThrowPokeballEvent
extends net.minecraftforge.eventbus.api.Event
Fired when a Pokéball is used in battle, or thrown outside of battle. Cancelable, but only when
usedInBattle
is false-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionnet.minecraft.world.item.ItemStack
The ItemStack for the Pokéballnet.minecraft.world.entity.player.Player
The player throwing the PokéballThe type of Pokéball being thrownboolean
Whether or not the ball was thrown from in battle -
Constructor Summary
ConstructorDescriptionThrowPokeballEvent
(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack itemStack, PokeBall type, boolean usedInBattle) -
Method Summary
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCanceled, setPhase, setResult
-
Field Details
-
player
public net.minecraft.world.entity.player.Player playerThe player throwing the Pokéball -
itemStack
public net.minecraft.world.item.ItemStack itemStackThe ItemStack for the Pokéball -
type
The type of Pokéball being thrown -
usedInBattle
public boolean usedInBattleWhether or not the ball was thrown from in battle
-
-
Constructor Details
-
ThrowPokeballEvent
public ThrowPokeballEvent(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack itemStack, PokeBall type, boolean usedInBattle)
-
-
Method Details
-
isCancelable
public boolean isCancelable()- Overrides:
isCancelable
in classnet.minecraftforge.eventbus.api.Event
-
setCanceled
public void setCanceled(boolean cancel) - Overrides:
setCanceled
in classnet.minecraftforge.eventbus.api.Event
-