Class PerItemSetting
java.lang.Object
net.okocraft.box.feature.autostore.setting.PerItemSetting
A class to hold the user's per-item settings.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearAndEnableItems
(@NotNull it.unimi.dsi.fastutil.ints.IntCollection itemIds) Clears and enables specified items.@NotNull it.unimi.dsi.fastutil.ints.IntSet
Gets all enabled item ids.boolean
Checks if theBoxItem
is enabled.void
setEnabled
(@NotNull BoxItem item, boolean enabled) Enables or disables the auto-store of the specifiedBoxItem
.boolean
toggleEnabled
(@NotNull BoxItem item) Toggles the auto-store of the specifiedBoxItem
.toString()
-
Constructor Details
-
PerItemSetting
public PerItemSetting()
-
-
Method Details
-
isEnabled
Checks if theBoxItem
is enabled. -
setEnabled
Enables or disables the auto-store of the specifiedBoxItem
.- Parameters:
item
- theBoxItem
to change the settingenabled
-true
to enable, orfalse
to disable
-
toggleEnabled
Toggles the auto-store of the specifiedBoxItem
. -
getEnabledItems
@NotNull public @NotNull it.unimi.dsi.fastutil.ints.IntSet getEnabledItems()Gets all enabled item ids.- Returns:
- all enabled item ids
-
clearAndEnableItems
public void clearAndEnableItems(@NotNull @NotNull it.unimi.dsi.fastutil.ints.IntCollection itemIds) Clears and enables specified items. -
toString
-