Class BackpackLoadout
java.lang.Object
org.rspeer.game.config.item.loadout.BackpackLoadout
- All Implemented Interfaces:
Cloneable
,Iterable<ItemEntry>
,InventoryLoadout
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds anItemEntry
to the loadoutvoid
add
(BackpackLoadout other) Appends a loadout to this loadoutvoid
add
(EquipmentLoadout other) Appends anEquipmentLoadout
to this loadout.static BackpackLoadout
clone()
int
getName()
iterator()
void
setEntries
(Map<String, ItemEntry> entries) void
setOutOfItemListener
(Consumer<ItemEntry> outOfItemListener) boolean
withdraw()
boolean
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.rspeer.game.config.item.loadout.InventoryLoadout
applyProvidedSetup, getExcessBackpackEntries, getExcessEntries, getExcessEquipmentEntries, getExcessItems, getInvalidBackpackItems, getInvalidEquipmentItems, getInvalidItems, getIrrelevantItems, getMissing, getMissingBackpackEntries, getMissingBackpackEntries, getMissingEntries, getMissingEntries, getMissingEntries, getMissingEntries, getMissingEquipmentEntries, getMissingEquipmentEntries, getValidBackpackResults, getValidEquipmentResults, getValidResults, isBackpackValid, isBackpackValid, isBagged, isBagged, isEquipmentValid, isEquipmentValid, isInventoryValid, isInventoryValid
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
BackpackLoadout
-
-
Method Details
-
bagged
-
setEntries
-
withdraw
- Returns:
- Withdraws this loadout from the bank. Returns true if the full withdraw was completed, false if it failed or requires another tick to complete the full withdrawal. If an entry is unavailable and not optional, it will call the outOfItemListener. Will call the out of item listener if there are none left in the bank, regardless of if you have it in the inventory
- See Also:
-
withdraw
public boolean withdraw()- Specified by:
withdraw
in interfaceInventoryLoadout
-
getAllocated
public int getAllocated() -
getName
- Specified by:
getName
in interfaceInventoryLoadout
- Returns:
- The name of this loadout
-
get
- Specified by:
get
in interfaceInventoryLoadout
- Returns:
- An
ItemEntry
with the given key
-
add
Description copied from interface:InventoryLoadout
Adds anItemEntry
to the loadout- Specified by:
add
in interfaceInventoryLoadout
- Returns:
true
if an item was successfully added to the loadout
-
remove
- Specified by:
remove
in interfaceInventoryLoadout
- Returns:
- The removed entry, or null if no ItemEntry matching the key was present
-
getOutOfItemListener
- Specified by:
getOutOfItemListener
in interfaceInventoryLoadout
-
setOutOfItemListener
- Specified by:
setOutOfItemListener
in interfaceInventoryLoadout
-
clone
- Specified by:
clone
in interfaceInventoryLoadout
-
add
Appends a loadout to this loadout- Parameters:
other
- The loadout to add
-
add
Appends anEquipmentLoadout
to this loadout. Note that it will skip over items you have equipped already. If you don't want to skip these, then useadd(BackpackLoadout)
withEquipmentLoadout.toBackpackLoadout(String)
as the arg- Parameters:
other
- The loadout to add
-
clone
- Specified by:
clone
in interfaceInventoryLoadout
-
iterator
-