▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/skLib
skLib

skLib

Not a Skript Addon

42
1
Все версииskLib 0.1.0

skLib 0.1.0

Beta11 мес. назад

Список изменений

skLib 0.1.0

Features

  1. Custom Inventories: Create inventories with custom titles and types (e.g., Hopper, Dropper) or custom row-based sizes (up to 6 rows). Titles only support MiniMessage formatting.

  2. Item & Click Handlers: Set items in inventory slots and attach custom click handlers to specific slots.

  3. Inventory Management: Open inventories for players, track them by UUID, and prevent stealing if marked as unstealable.

  4. Event Handling: Handles click, inventory close, and player quit events.

  5. Utility Methods: Fill the inventory with one item and close inventories when needed.


How to Use

1. Create a Custom Inventory

GuiInventory gui = new GuiInventory("Title", InventoryTypes.HOPPER, true);

Or with rows: (uses chest)

GuiInventory gui = new GuiInventory("Title", 3, true);

2. Add Items & Click Handlers

gui.setItem(0, new ItemStack(Material.DIAMOND), clickEvent -> {
    clickEvent.getPlayer().sendMessage("You clicked the diamond!");
});

3. Open Inventory

gui.open(player);

4. Close Inventory

clickEvent.close();

5. Fill Inventory (sets all of the slots in the inventory to the specified item)

gui.fillInventory(new ItemStack(Material.STONE));

This is a beta release, any suggestions will be appreciated! If you encounter an issue, do report it!

Файлы

skLib-0.1.0.jar(5.91 KiB)
Основной
Скачать

Метаданные

Канал релиза

Beta

Номер версии

0.1.0

Загрузчики

Paper

Версии игры

1.20–1.20.6

Загрузок

42

Дата публикации

11 мес. назад

Загрузил

ID версии

Главная