1package com.runehive.content.bags;
3import com.runehive.game.world.entity.mob.player.Player;
4import com.runehive.game.world.items.Item;
5import com.runehive.game.world.items.ItemDefinition;
6import com.runehive.game.world.items.containers.ItemContainer;
8import java.util.Arrays;
9import java.util.function.Predicate;
50 player.
message(
"You don't have enough inventory space to empty the contents of this "+
getName()+
".");
59 if(item ==
null)
continue;
61 int amount = item.getAmount();
63 if(amount > freeSlots)
80 if(item ==
null)
continue;
ItemBag(ItemContainer container)
abstract String getItem()
void empty(Player player)
abstract String getName()
final ItemContainer container
void check(Player player)
abstract String getIndication()
abstract Predicate< Item > isAllowed()
This class represents a character controlled by a player.
final Inventory inventory
void message(String message)
Represents all of an in-game Item's attributes.
static ItemDefinition get(int id)
Gets an item definition.
String getName()
Gets the item name.
The container class that represents an item that can be interacted with.
An abstraction game representing a group of Items.
boolean remove(Item item)
Attempts to withdraw item from this container.
boolean add(Item item)
Attempts to deposit item into this container.
void refresh()
Refreshes the players inventory.