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

    Fields
    Modifier and Type
    Field
    Description
    net.minecraft.world.item.ItemStack
    The ItemStack for the Pokéball
    net.minecraft.world.entity.player.Player
    The player throwing the Pokéball
    The type of Pokéball being thrown
    boolean
    Whether or not the ball was thrown from in battle
  • Constructor Summary

    Constructors
    Constructor
    Description
    ThrowPokeballEvent(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack itemStack, PokeBall type, boolean usedInBattle)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    void
    setCanceled(boolean cancel)
     

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • player

      public net.minecraft.world.entity.player.Player player
      The player throwing the Pokéball
    • itemStack

      public net.minecraft.world.item.ItemStack itemStack
      The ItemStack for the Pokéball
    • type

      public PokeBall type
      The type of Pokéball being thrown
    • usedInBattle

      public boolean usedInBattle
      Whether 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 class net.minecraftforge.eventbus.api.Event
    • setCanceled

      public void setCanceled(boolean cancel)
      Overrides:
      setCanceled in class net.minecraftforge.eventbus.api.Event