Package net.storm.api.items.loadouts
Class LoadoutItem
java.lang.Object
net.storm.api.items.loadouts.LoadoutItem
Represents a single item within a loadout configuration.
A LoadoutItem contains all the information needed to identify and manage an item as part of a loadout, including:
- Item identification (ID)
- Quantity requirements (minimum and maximum)
- Item properties (stackable, noted)
- Container type and slot position
The quantity and maxQuantity fields allow for flexible requirements:
- For exact quantities, set both to the same value
- For "at least X" requirements, set quantity to X and maxQuantity higher
- For non-stackable items, maxQuantity typically equals 1
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines the container type for a loadout item. -
Constructor Summary
ConstructorsConstructorDescriptionLoadoutItem(int id, int quantity, boolean stackable, boolean noted, LoadoutItem.Type type, int slot) Creates a new LoadoutItem with automatic max quantity calculation.LoadoutItem(int id, int quantity, int maxQuantity, boolean stackable, boolean noted, boolean strict, LoadoutItem.Type type, int slot) Creates a new LoadoutItem with all properties specified.LoadoutItem(int id, int quantity, int maxQuantity, boolean stackable, boolean noted, LoadoutItem.Type type, int slot) Creates a new LoadoutItem with strict mode disabled. -
Method Summary
-
Constructor Details
-
LoadoutItem
public LoadoutItem(int id, int quantity, int maxQuantity, boolean stackable, boolean noted, boolean strict, LoadoutItem.Type type, int slot) Creates a new LoadoutItem with all properties specified.- Parameters:
id- the item IDquantity- the minimum required quantitymaxQuantity- the maximum quantity to maintainstackable- whether the item is stackablenoted- whether the item should be notedstrict- whether to require exact ID matchtype- the container typeslot- the slot index
-
LoadoutItem
public LoadoutItem(int id, int quantity, int maxQuantity, boolean stackable, boolean noted, LoadoutItem.Type type, int slot) Creates a new LoadoutItem with strict mode disabled.- Parameters:
id- the item IDquantity- the minimum required quantitymaxQuantity- the maximum quantity to maintainstackable- whether the item is stackablenoted- whether the item should be notedtype- the container typeslot- the slot index
-
LoadoutItem
public LoadoutItem(int id, int quantity, boolean stackable, boolean noted, LoadoutItem.Type type, int slot) Creates a new LoadoutItem with automatic max quantity calculation.For non-stackable items, maxQuantity is set to 1. For stackable items, maxQuantity equals quantity.
- Parameters:
id- the item IDquantity- the required quantitystackable- whether the item is stackablenoted- whether the item should be notedtype- the container typeslot- the slot index
-