Class LoadoutItem

java.lang.Object
net.storm.api.items.loadouts.LoadoutItem

public final class LoadoutItem extends Object
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 Classes
    Modifier and Type
    Class
    Description
    static enum 
    Defines the container type for a loadout item.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LoadoutItem(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 ID
      quantity - the minimum required quantity
      maxQuantity - the maximum quantity to maintain
      stackable - whether the item is stackable
      noted - whether the item should be noted
      strict - whether to require exact ID match
      type - the container type
      slot - 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 ID
      quantity - the minimum required quantity
      maxQuantity - the maximum quantity to maintain
      stackable - whether the item is stackable
      noted - whether the item should be noted
      type - the container type
      slot - 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 ID
      quantity - the required quantity
      stackable - whether the item is stackable
      noted - whether the item should be noted
      type - the container type
      slot - the slot index