From e2a35cfbcbd707999f7452fdc039f0720c56d30e Mon Sep 17 00:00:00 2001 From: Touchie771 Date: Thu, 27 Nov 2025 20:04:30 +0200 Subject: [PATCH 1/2] fixed bad short design --- src/main/java/me/touchie771/minecraftGUI/api/SlotItem.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/touchie771/minecraftGUI/api/SlotItem.java b/src/main/java/me/touchie771/minecraftGUI/api/SlotItem.java index 26bdfda..6e16a57 100644 --- a/src/main/java/me/touchie771/minecraftGUI/api/SlotItem.java +++ b/src/main/java/me/touchie771/minecraftGUI/api/SlotItem.java @@ -26,7 +26,7 @@ */ public record SlotItem( @Nullable Component itemName, - short itemSlot, + int itemSlot, @Nullable Material material, int quantity, @Nullable List lore, @@ -43,7 +43,7 @@ public record SlotItem( * @param material The material * @param quantity The quantity */ - public SlotItem(@NotNull Component itemName, short itemSlot, @NotNull Material material, int quantity) { + public SlotItem(@NotNull Component itemName, int itemSlot, @NotNull Material material, int quantity) { this(itemName, itemSlot, material, quantity, null, null, null, null, null); } } \ No newline at end of file From d45e84e0e8f70e1fbd2d2e25420a31567b23a984 Mon Sep 17 00:00:00 2001 From: Touchie771 Date: Thu, 27 Nov 2025 20:09:39 +0200 Subject: [PATCH 2/2] documented readme --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index eb2b7d5..3a93730 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ public class ExamplePlugin extends JavaPlugin { .items( new SlotItem( Component.text("Diamond Sword"), - (short) 13, // Center slot + 13, // Center slot Material.DIAMOND_SWORD, 1 ) @@ -72,15 +72,15 @@ Menu complexMenu = Menu.newBuilder() .size(54) .title(Component.text("Complex Menu")) .items( - new SlotItem(Component.text("Shop"), (short) 10, Material.CHEST, 1), - new SlotItem(Component.text("Settings"), (short) 13, Material.REDSTONE, 1), - new SlotItem(Component.text("Info"), (short) 16, Material.BOOK, 1) + new SlotItem(Component.text("Shop"), 10, Material.CHEST, 1), + new SlotItem(Component.text("Settings"), 13, Material.REDSTONE, 1), + new SlotItem(Component.text("Info"), 16, Material.BOOK, 1) ) .build(); // Modify menu after creation complexMenu.addItems( - new SlotItem(Component.text("New Item"), (short) 22, Material.EMERALD, 1) + new SlotItem(Component.text("New Item"), 22, Material.EMERALD, 1) ); // Get item at specific slot (useful for click events) @@ -124,7 +124,7 @@ Represents an item in a menu slot. **Parameters:** - `Component itemName` - Display name of the item -- `short itemSlot` - Slot position (0-53 for chest inventories) +- `int itemSlot` - Slot position (0-53 for chest inventories) - `Material material` - Minecraft material type - `int quantity` - Stack size (1-64)