public static interface Inventory.Builder extends ResettableBuilder<Inventory,Inventory.Builder>
InventoryArchetype
s.Modifier and Type | Method and Description |
---|---|
Inventory |
build(Object plugin)
Builds the
Inventory . |
Inventory.Builder |
forCarrier(Carrier carrier)
Sets the InventoryArchetype and Properties according to the
Carrier s Inventory. |
Inventory.Builder |
forCarrier(Class<? extends Carrier> carrier)
Sets the InventoryArchetype and Properties for a default Inventory of
given
Carrier . |
<E extends InteractInventoryEvent> |
listener(Class<E> type,
Consumer<E> listener)
Registers a listener for given Event type
|
Inventory.Builder |
of(InventoryArchetype archetype)
Sets the base
InventoryArchetype for the Inventory. |
Inventory.Builder |
property(InventoryProperty<?,?> property)
Sets an
InventoryProperty with its default key. |
Inventory.Builder |
property(String name,
InventoryProperty<?,?> property)
Sets an
InventoryProperty . |
Inventory.Builder |
withCarrier(Carrier carrier)
Sets the
Carrier that carries the Inventory. |
from, reset
Inventory.Builder of(InventoryArchetype archetype)
InventoryArchetype
for the Inventory.archetype
- The InventoryArchetypeInventory.Builder property(String name, InventoryProperty<?,?> property)
InventoryProperty
.name
- The nameproperty
- The propertyInventory.Builder property(InventoryProperty<?,?> property)
InventoryProperty
with its default key.property
- The propertyInventory.Builder withCarrier(Carrier carrier)
Carrier
that carries the Inventory.carrier
- The Carrier<E extends InteractInventoryEvent> Inventory.Builder listener(Class<E> type, Consumer<E> listener)
type
- The typelistener
- The listenerInventory.Builder forCarrier(Carrier carrier)
Carrier
s Inventory.carrier
- The CarrierInventory.Builder forCarrier(Class<? extends Carrier> carrier)
Carrier
.carrier
- The Carrier class