public class HeldItemChangedEvent
extends net.minecraftforge.fml.common.eventhandler.Event
Cancelling this event will prevent the held item from being changed and, if the change was triggered via the inventory party GUI, prevents any associated changes from being performed on the player's inventory.
Modifier and Type | Field and Description |
---|---|
net.minecraft.item.ItemStack |
newHeldItem
The held item to use.
|
net.minecraft.entity.player.EntityPlayerMP |
player
The player owner of the Pokémon, if there is a player owner.
|
Pokemon |
pokemon
The Pokémon who is getting the new item.
|
Constructor and Description |
---|
HeldItemChangedEvent(net.minecraft.entity.player.EntityPlayerMP player,
Pokemon pokemon,
net.minecraft.item.ItemStack newHeldItem) |
Modifier and Type | Method and Description |
---|---|
EnumSpecies |
getSpecies()
Gets the type of Pokémon whose held item was changed, as an
EnumSpecies |
public final net.minecraft.entity.player.EntityPlayerMP player
public final Pokemon pokemon
@Nonnull public net.minecraft.item.ItemStack newHeldItem
public HeldItemChangedEvent(@Nullable net.minecraft.entity.player.EntityPlayerMP player, Pokemon pokemon, net.minecraft.item.ItemStack newHeldItem)
public EnumSpecies getSpecies()
EnumSpecies