EquipmentLoadout
A high-level loadout API designed for use in conjunction with equipment.
ClassRLPlugins API
public class EquipmentLoadout extends LoadoutMembers
Constructors
- newEquipmentLoadout(String)
Creates a EquipmentLoadout.
Methods
- voidadd(LoadoutItem)
Add.
- LoadoutItem
- List<LoadoutItem>getRequiredItems()
The required items.
- LoadoutItemremove(EquipmentSlot)
Remove.
Inherited from Loadout
- LoadoutItemget(String)
Get.
- List<LoadoutItem>getExcessItems()
The excess items.
- List<ItemEx>getForeignItems()
The foreign items.
- ItemDepletionListenergetItemDepletionListener()
The item depletion listener.
- StringgetName()
The name.
- booleanisFulfilled()
Whether fulfilled.
- Iterator<LoadoutItem>iterator()
Iterator.
- LoadoutItemremove(String)
Remove.
- voidsetItemDepletionListener(ItemDepletionListener)
Sets the item depletion listener.
EquipmentLoadout(String)
public EquipmentLoadout(String name)Creates a EquipmentLoadout.
Parameters
name- Name.
add(LoadoutItem)
public void add(LoadoutItem item)Add.
Parameters
item- Item.
get(EquipmentSlot)
public LoadoutItem get(EquipmentSlot slot)Get.
Parameters
slot- Slot.
getRequiredItems()
public List<LoadoutItem> getRequiredItems()The required items.
remove(EquipmentSlot)
public LoadoutItem remove(EquipmentSlot slot)Remove.
Parameters
slot- Slot.
get(String)from Loadout
public LoadoutItem get(String key)Get.
Parameters
key- Key.
getExcessItems()from Loadout
public List<LoadoutItem> getExcessItems()The excess items.
Returns
A List of items that are not foreign to this loadout, but are present in excess quantities.
getForeignItems()from Loadout
public List<ItemEx> getForeignItems()The foreign items.
Returns
A List of foreign items that are currently in the inventory, or equipment if this is an EquipmentLoadout. A foreign item includes anything that isn't in this loadout.
getItemDepletionListener()from Loadout
public ItemDepletionListener getItemDepletionListener()The item depletion listener.
Returns
A listener to trigger when an item is attempted to be interacted with but is not available or in the desired quantity. This can be utilised to trigger states in your plugin such as restocking.
getName()from Loadout
public String getName()The name.
isFulfilled()from Loadout
public boolean isFulfilled()Whether fulfilled.
iterator()from Loadout
public Iterator<LoadoutItem> iterator()Iterator.
remove(String)from Loadout
public LoadoutItem remove(String key)Remove.
Parameters
key- Key.
setItemDepletionListener(ItemDepletionListener)from Loadout
public void setItemDepletionListener(ItemDepletionListener itemDepletionListener)Sets the item depletion listener.
Parameters
itemDepletionListener- Item depletion listener.
Also allowed
Every class has these, as in plain Java.
equals, forEach, toString