Class FloorView

java.lang.Object
com.realtime.crossfire.jxclient.items.AbstractItemView
com.realtime.crossfire.jxclient.items.FloorView
All Implemented Interfaces:
ItemView

public class FloorView extends AbstractItemView
Provides a view to all items comprising the current floor view.

If an opened container exists, the floor view consists of the container in the first slot followed by the contained items. Otherwise, all objects in location 0 are returned.

  • Constructor Details

    • FloorView

      public FloorView(@NotNull @NotNull ItemSet itemSet)
      Creates a new instance.
      Parameters:
      itemSet - the item set to use
  • Method Details

    • getCurrentFloorTag

      public int getCurrentFloorTag()
      Returns the current floor location.
      Returns:
      the current floor location: a container's tag or 0
    • getSize

      public int getSize()
      Description copied from interface: ItemView
      Returns the number of items.
      Returns:
      the number of items
    • getItem

      @Nullable public @Nullable CfItem getItem(int index)
      Description copied from interface: ItemView
      Returns the CfItem in a given slot.
      Parameters:
      index - the slot index
      Returns:
      the item or null if the slot is empty