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

skLib

Not a Skript Addon

42
1

skLib 0.1.0

beta26 апреля 2025 г.

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!

Совместимость

Minecraft: Java Edition

1.20.x

Платформы

Поддерживаемые окружения

Сервер

Детали

Лицензия:MIT
Опубликован:11 месяцев назад
Обновлён:11 месяцев назад
Главная