public class HeldItemChangedEvent
extends net.minecraftforge.eventbus.api.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.ServerPlayerEntity |
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.ServerPlayerEntity player,
Pokemon pokemon,
net.minecraft.item.ItemStack newHeldItem) |
Modifier and Type | Method and Description |
---|---|
Species |
getSpecies()
Gets the type of Pokémon whose held item was changed, as an
Species |
public final net.minecraft.entity.player.ServerPlayerEntity player
public final Pokemon pokemon
@Nonnull public net.minecraft.item.ItemStack newHeldItem
public HeldItemChangedEvent(@Nullable net.minecraft.entity.player.ServerPlayerEntity player, Pokemon pokemon, net.minecraft.item.ItemStack newHeldItem)