Class ContainerSpec
java.lang.Object
com.ultikits.ultitools.ui.ContainerSpec
How to create a container. Immutable.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<org.bukkit.inventory.ItemStack> private final Durationprivate final @Nullable UUIDprivate final @Nullable Dispositionprivate final booleanprivate final List<org.bukkit.inventory.ItemStack> private final ContainerKindstatic final intMaximum number of container indexes.private final Consumer<ContainerChange> private final TransferPolicyprivate final intprivate final @Nullable ContainerStoreprivate final @Nullable UndeliveredHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.bukkit.inventory.ItemStack> baseline()Baseline contents; copies, empty stacks when contributed initial contents were selected.Maximum time to wait for a store answer.Contributor ofinitial(), absent when baseline contents were selected.(package private) static org.bukkit.inventory.ItemStack(package private) static List<org.bukkit.inventory.ItemStack> The storage disposition; absent for templates.booleanWhether the last screen's close ends the container.List<org.bukkit.inventory.ItemStack> initial()Contributed initial contents; copies, empty stacks when a baseline was selected.kind()Whether items are real or template copies.onChange()Listener invoked after each applied transfer.policy()The transfer policy.intsize()The number of indexes.static ContainerSpec.Builderstorage(int size) Real items.store()The optional store.static ContainerSpec.Buildertemplate(int size) Copies (editors of definitions): put-in copies, take-out deletes the copy; no disposition, store or handler.The storage handler; absent for templates.
-
Field Details
-
MAX_SIZE
public static final int MAX_SIZEMaximum number of container indexes.- See Also:
-
kind
-
size
private final int size -
policy
-
disposition
-
store
-
commitTimeout
-
undelivered
-
endWhenUnviewed
private final boolean endWhenUnviewed -
onChange
-
contributor
-
initial
-
baseline
-
-
Constructor Details
-
ContainerSpec
-
-
Method Details
-
storage
Real items. A disposition is required. @throws IllegalArgumentException outside 1..4096 -
template
Copies (editors of definitions): put-in copies, take-out deletes the copy; no disposition, store or handler. -
kind
Whether items are real or template copies. -
size
public int size()The number of indexes. -
policy
The transfer policy. -
disposition
The storage disposition; absent for templates. -
store
The optional store. -
commitTimeout
Maximum time to wait for a store answer. -
undelivered
The storage handler; absent for templates. -
endWhenUnviewed
public boolean endWhenUnviewed()Whether the last screen's close ends the container. -
onChange
Listener invoked after each applied transfer. -
contributor
-
initial
Contributed initial contents; copies, empty stacks when a baseline was selected. -
baseline
Baseline contents; copies, empty stacks when contributed initial contents were selected. -
copyItem
-
copyItems
-