namespace Minecraft.Server.FourKit.Event.Player; using Minecraft.Server.FourKit.Entity; /// /// Thrown when a player picks an item up from the ground. /// If cancelled the item will not be picked up. /// public class PlayerPickupItemEvent : PlayerEvent, Cancellable { private readonly Item _item; private readonly int _remaining; private bool _cancelled; internal PlayerPickupItemEvent(Player player, Item item, int remaining) : base(player) { _item = item; _remaining = remaining; } /// /// Gets the Item picked up by the player. /// /// The entity. public Item getItem() => _item; /// /// Gets the amount remaining on the ground, if any. /// /// Amount remaining on the ground. public int getRemaining() => _remaining; /// public bool isCancelled() => _cancelled; /// public void setCancelled(bool cancel) { _cancelled = cancel; } }