LoadoutItem
One item of a loadout: how many, where, and whether it is optional.
Abstract classRLPlugins API
public abstract class LoadoutItemExtended by IdLoadoutItem, NamedLoadoutItem
Members
Constructors
- newLoadoutItem(String, int, int, boolean, boolean, boolean, EquipmentSlot, RestockConfig)
Creates a LoadoutItem.
Methods
- intgetAmount()
The amount.
- List<ItemEx>getBanked()
The banked.
- List<ItemEx>getCarried()
The carried.
- EquipmentSlotgetEquipmentSlot()
The equipment slot.
- StringgetIdentifier()
The identifier.
- intgetMinimumAmount()
The minimum amount.
- RestockConfiggetRestockConfig()
The restock config.
- List<ItemEx>getWorn()
The worn.
- booleanisCarried()
Whether carried.
- booleanisNoted()
Whether noted.
- booleanisOptional()
Whether optional.
- booleanisStackable()
Whether stackable.
- booleanisWorn()
Whether worn.
LoadoutItem(String, int, int, boolean, boolean, boolean, EquipmentSlot, RestockConfig)
public LoadoutItem(String identifier, int minimumAmount, int amount, boolean stackable, boolean noted, boolean optional, EquipmentSlot equipmentSlot, RestockConfig restockConfig)Creates a LoadoutItem.
Parameters
identifier- Identifier.
minimumAmount- Minimum amount.
amount- Amount.
stackable- Stackable.
noted- Noted.
optional- Optional.
equipmentSlot- Equipment slot.
restockConfig- Restock config.
getAmount()
public int getAmount()The amount.
Returns
The amount used in withdrawing.
getBanked()
public abstract List<ItemEx> getBanked()The banked.
Returns
A List of items in the bank pertaining to this LoadoutItem.
getCarried()
public abstract List<ItemEx> getCarried()The carried.
Returns
A List of items carried in the inventory pertaining to this LoadoutItem.
getEquipmentSlot()
public EquipmentSlot getEquipmentSlot()The equipment slot.
getIdentifier()
public String getIdentifier()The identifier.
getMinimumAmount()
public int getMinimumAmount()The minimum amount.
Returns
The amount used in validations.
getRestockConfig()
public RestockConfig getRestockConfig()The restock config.
getWorn()
public abstract List<ItemEx> getWorn()The worn.
Returns
A List of items worn in the equipment pertaining to this LoadoutItem.
isCarried()
public boolean isCarried()Whether carried.
Returns
true if the LoadoutItem is carried. Different to getCarried in the sense that it checks for all parameters such as valid quantities.
isNoted()
public boolean isNoted()Whether noted.
isOptional()
public boolean isOptional()Whether optional.
Returns
If the item is optional or not. Items marked as optional will not be passed to the ItemDepletionListener.
isStackable()
public boolean isStackable()Whether stackable.
isWorn()
public boolean isWorn()Whether worn.
Returns
true if the LoadoutItem is worn. Different to getWorn in the sense that it checks for all parameters such as valid quantities.
Also allowed
Every class has these, as in plain Java.
equals, toString