Skip to content

Instantly share code, notes, and snippets.

View katorly's full-sized avatar
🎯
Focusing

Katorly katorly

🎯
Focusing
View GitHub Profile
@Mindgamesnl
Mindgamesnl / very nice.md
Last active August 18, 2023 14:52
Inventory holders, a quicky

Inventory holders can be used to register own types, handlers and data to a opened GUI for a player.

To start, we need to create our menu class that implemetns InventoryHolder and any other functions we may want. For this example, we are gonna fill the inventory and open it for player, then save the player for later ussage with our handler.

The menu

It will look something like this

import org.bukkit.Bukkit;
import org.bukkit.Material;