namespace Minecraft.Server.FourKit.Event.Inventory;
using Minecraft.Server.FourKit.Entity;
using Minecraft.Server.FourKit.Inventory;
///
/// Represents a player related inventory event.
///
public class InventoryEvent : Event
{
/// The inventory view associated with this event.
protected readonly InventoryView transaction;
internal InventoryEvent(InventoryView transaction)
{
this.transaction = transaction;
}
///
/// Gets the primary Inventory involved in this transaction.
///
/// The upper inventory.
public global::Minecraft.Server.FourKit.Inventory.Inventory getInventory()
{
return transaction.getTopInventory();
}
///
/// Gets the list of players viewing the primary (upper) inventory
/// involved in this event.
///
/// A list of people viewing.
public List getViewers()
{
return transaction.getTopInventory().getViewers();
}
///
/// Gets the view object itself.
///
/// The InventoryView.
public InventoryView getView()
{
return transaction;
}
}