Package rea.events

Class InventoryUpdateEvent

java.lang.Object
rea.events.InventoryUpdateEvent
All Implemented Interfaces:
UpdateEvent

public class InventoryUpdateEvent extends Object implements UpdateEvent
An event that is sent to the client to update the player's inventory. The event contains a list of items and the item the player is holding.
Author:
José Paulo Leal jpleal@fc.up.pt
  • Constructor Details

    • InventoryUpdateEvent

      public InventoryUpdateEvent(List<Item> items, Item holding)
      Create an inventory update event with a list of items and the item the player is holding
      Parameters:
      items - the player's inventory
      holding - the item the player is holding
  • Method Details

    • getInventory

      public List<Item> getInventory()
      Get the player's inventory
      Returns:
      a list of items in the player's inventory
    • getHolding

      public Item getHolding()
      Get the item the player is holding
      Returns:
      the item the player is holding