1package com.dreamfirestudios.dreamcore.DreamSmartInvs.opener;
3import com.dreamfirestudios.dreamcore.DreamCore;
4import com.dreamfirestudios.dreamcore.DreamSmartInvs.InventoryManager;
5import com.dreamfirestudios.dreamcore.DreamSmartInvs.SmartInventory;
6import com.google.common.base.Preconditions;
7import org.bukkit.Bukkit;
8import org.bukkit.entity.Player;
9import org.bukkit.event.inventory.InventoryType;
10import org.bukkit.inventory.Inventory;
15 @SuppressWarnings(
"deprecation")
17 Preconditions.checkArgument(inv.getColumns() == 9,
18 "The column count for the chest inventory must be 9, found: %s.", inv.getColumns());
19 Preconditions.checkArgument(inv.getRows() >= 1 && inv.getRows() <= 6,
20 "The row count for the chest inventory must be between 1 and 6, found: %s", inv.getRows());
23 Inventory handle = Bukkit.createInventory(player, inv.getRows() * inv.getColumns(), inv.getTitle());
27 player.openInventory(handle);
35 return type == InventoryType.CHEST || type == InventoryType.ENDER_CHEST;
static DreamCore DreamCore
Optional< InventoryContents > getContents(Player p)
Inventory open(SmartInventory inv, Player player)
boolean supports(InventoryType type)
default void fill(Inventory handle, InventoryContents contents)