Class EquipmentLoadout
java.lang.Object
org.rspeer.game.config.item.loadout.EquipmentLoadout
- All Implemented Interfaces:
Cloneable
,Iterable<ItemEntry>
,InventoryLoadout
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds anItemEntry
to the loadoutclone()
void
equip()
get
(Equipment.Slot slot) Deprecated, for removal: This API element is subject to removal in a future version.getName()
boolean
isWorn()
Deprecated, for removal: This API element is subject to removal in a future version.iterator()
boolean
remove
(Equipment.Slot slot) void
setEntries
(Map<String, ItemEntry> entries) void
setOutOfItemListener
(Consumer<ItemEntry> outOfItemListener) toBackpackLoadout
(String name) boolean
withdraw()
static EquipmentLoadout
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
-
EquipmentLoadout
-
-
Method Details
-
worn
-
withdraw
public boolean withdraw()- Specified by:
withdraw
in interfaceInventoryLoadout
-
setEntries
-
isWorn
Deprecated, for removal: This API element is subject to removal in a future version.UseInventoryLoadout.isEquipmentValid()
instead.- Returns:
true
if all entries are currently equipped. IfItemEntry.isOptional()
is true, it ignores validation for that item
-
getBagged
Deprecated, for removal: This API element is subject to removal in a future version.UseInventoryLoadout.getValidBackpackResults()
instead.- Returns:
- A
List
containing items from this loadout that are in the backpack
-
equip
public void equip() -
toBackpackLoadout
-
get
-
remove
-
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
-
clone
- Specified by:
clone
in interfaceInventoryLoadout
-
iterator
-