Available Methods

MethodReturnsDescription
addItem(Player player, ItemStack item)voidAdds an item to the player's virtual container.
addItem(UUID ownerId, ItemStack item)voidAdds an item to a container by owner UUID.
removeItem(Player player, ItemStack item)voidRemoves a matching item from the player's container.
removeItem(UUID ownerId, ItemStack item)voidRemoves a matching item from a container by owner UUID.
takeItem(UUID ownerId, ItemStack item, int amount)intAttempts to withdraw a specific amount and returns how many items were removed.
getItems(Player player)List<ItemStack>Returns the stored items for the player's container.
getItems(UUID ownerId)List<ItemStack>Returns stored items by owner UUID.
containsItem(Player player, ItemStack item)booleanChecks whether the player's container contains a matching item.
clear(Player player)voidClears the player's virtual container.
clear(UUID ownerId)voidClears a virtual container by owner UUID.
openContainer(Player player)voidOpens the player's own container GUI.
openContainer(Player viewer, UUID ownerId, String ownerName)voidOpens another owner's container for a viewer.
openAdminContainer(Player admin, Player owner)voidOpens an admin-facing container view for another player.
flush()voidFlushes pending container and storage block changes to the active backend.
createPersonalStorageBlockItem(int amount)ItemStackCreates the configured personal storage block item.
isPersonalStorageBlockItem(ItemStack item)booleanChecks whether an item is a VContainer personal storage block item.
createGlobalStorageBlock(Block block)booleanRegisters a world block as a global storage block.
createPersonalStorageBlock(Block block, Player owner)booleanRegisters a world block as a player-owned personal storage block.
removeGlobalStorageBlock(Block block)booleanRemoves a registered global storage block.
removePersonalStorageBlock(String storageKey, boolean keepBlock)booleanRemoves a personal storage block by key and optionally leaves the world block in place.
isStorageBlock(Block block)booleanChecks whether a world block is registered as a VContainer storage block.
getStorageBlock(Block block)Optional<StorageBlockInfo>Looks up storage block metadata from a world block.
getStorageBlock(String storageKey)Optional<StorageBlockInfo>Looks up storage block metadata by storage key.
getStorageBlocks()Collection<StorageBlockInfo>Returns every registered storage block.
getGlobalStorageBlocks()Collection<StorageBlockInfo>Returns registered global storage blocks.
getPersonalStorageBlocks()Collection<StorageBlockInfo>Returns registered personal storage blocks.
canAccessStorageBlock(Player player, String storageKey)booleanChecks owner/member access for a storage block.
isStorageBlockOwner(Player player, String storageKey)booleanChecks whether the player owns the storage block.
canPlacePersonalStorageBlock(Block block, Player owner)booleanChecks placement rules and chunk limits for a personal storage block.
getPersonalStorageBlockChunkLimit()intReturns the configured per-chunk personal storage block limit.
addStorageBlockMember(String storageKey, UUID memberId)booleanAdds a member to a personal storage block.
removeStorageBlockMember(String storageKey, UUID memberId)booleanRemoves a member from a personal storage block.
setStorageBlockMember(String storageKey, UUID memberId, boolean member)booleanAdds or removes a storage block member based on the boolean value.
getStorageBlockKey(Block block)StringReturns the storage key for a registered world block.

Related Events

  • ContainerAddItemEvent
  • ContainerWithdrawItemEvent
  • StorageBlockHopperTransferEvent

Behavior Notes

  • Storage block lookups return StorageBlockInfo metadata with key, type, owner, and member data.
  • flush() is useful after batch changes; normal automatic persistence still runs on the plugin schedule.
  • Member methods apply to personal storage blocks and use the storage key returned by block lookup methods.