Package net.minestom.server.event.player
Class PlayerAddItemStackEvent
java.lang.Object
net.minestom.server.event.Event
net.minestom.server.event.CancellableEvent
net.minestom.server.event.player.PlayerAddItemStackEvent
public class PlayerAddItemStackEvent extends CancellableEvent
Called as a result of
PlayerInventory.addItemStack(ItemStack)
.-
Constructor Summary
Constructors Constructor Description PlayerAddItemStackEvent(Player player, ItemStack itemStack)
-
Method Summary
Modifier and Type Method Description ItemStack
getItemStack()
Gets the item stack which will be added.Player
getPlayer()
Gets the player who has an item stack added to his inventory.void
setItemStack(ItemStack itemStack)
Changes the item stack which will be added.
-
Constructor Details
-
Method Details
-
getPlayer
Gets the player who has an item stack added to his inventory.- Returns:
- the player
-
getItemStack
Gets the item stack which will be added.- Returns:
- the item stack
-
setItemStack
Changes the item stack which will be added.- Parameters:
itemStack
- the new item stack
-