J
📎 1 file 11,414 chars
📄
pasted-code-1791367066297.txt
txt 228 lines
▶
Create a modern, lightweight, and fully configurable Minecraft Shop plugin named "ApexShop" for Paper/Spigot 1.21+.

Plugin Requirements & Features:

1. Core Functionality:
   - Plugin Name: ApexShop
   - Main Command: /shop (opens the main Category Selector GUI)
   - Admin Command: /apexshop reload (reloads all config files, permission: apexshop.admin)
   - Integration: Vault API for Economy support (check if Vault and an Economy plugin like EssentialsX are loaded).

2. GUI Layout & Navigation:
   - Main Menu (/shop):
     * Chest GUI titled "&8&lApexShop | Categories" (54 slots, 6 rows).
     * Categories in Main Menu:
       1. Blocks (Item: GRASS_BLOCK, Slot: 11)
       2. Minerals (Item: DIAMOND, Slot: 13)
       3. Mob Drops (Item: ROTTEN_FLESH, Slot: 15)
       4. Food (Item: GOLDEN_CARROT, Slot: 29)
       5. Farms (Item: WHEAT, Slot: 31)
       6. Misc & Trains (Item: CHEST, Slot: 33)
     * Border & Filler: GRAY_STAINED_GLASS_PANE named " " for all unused slots.
     * Close button: BARRIER in slot 49.

   - Sub-Menu Navigation:
     * Size: 54 slots (6 rows).
     * Border & Fillers: Outer border and unused slots filled with GRAY_STAINED_GLASS_PANE.
     * Navigation buttons:
       - ARROW in slot 48 (Back to Main Category Menu).
       - OAK_PLANKS / BARREL in slot 49 named "&c&lSELL ALL" (Sells all sellable items from player inventory).

3. Interaction & Economy:
   - Left-Click on a shop item: BUY 1x.
   - Right-Click on a shop item: SELL 1x.
   - Shift + Left-Click: BUY 64x (Full Stack).
   - Shift + Right-Click: SELL all of that specific item from inventory.
   - Item Lore structure:
     * "&6Buy 1 for &a$%buy_price%"
     * "&cSell 1 for &e$%sell_price%"
     * "&eLeft Click to Buy | Right Click to Sell"

4. Complete Configuration File Generation:

   a) config.yml:
      ```yaml
      plugin-prefix: "&8[&bApexShop&8] "
      sounds:
        enabled: true
        success: "ENTITY_EXPERIENCE_ORB_PICKUP"
        failure: "ENTITY_VILLAGER_NO"
        click: "UI_BUTTON_CLICK"
      messages:
        no-permission: "&cJe hebt geen toestemming om dit commando uit te voeren."
        reload-success: "&aConfiguraties succesvol herladen!"
        buy-success: "&aJe hebt %amount%x %item% gekocht voor &2$%price%&a!"
        sell-success: "&aJe hebt %amount%x %item% verkocht voor &2$%price%&a!"
        sell-all-success: "&aJe hebt al je shopitems verkocht voor &2$%price%&a!"
        insufficient-funds: "&cJe hebt niet genoeg geld! Je hebt $%price% nodig."
        insufficient-items: "&cJe hebt dit item niet in je inventory om te verkopen."
        nothing-to-sell: "&cJe hebt geen items in je inventory die verkocht kunnen worden."
      ```

   b) categories.yml:
      ```yaml
      categories:

        # ----------------------------------------------------
        # 1. BLOCKS
        # ----------------------------------------------------
        blocks:
          slot: 11
          material: "GRASS_BLOCK"
          display-name: "&a&lBlocks"
          title: "&8&lApexShop | Blocks"
          items:
            grass_block: { slot: 10, material: "GRASS_BLOCK", buy-price: 10.0, sell-price: 2.0 }
            dirt: { slot: 11, material: "DIRT", buy-price: 5.0, sell-price: 1.0 }
            stone: { slot: 12, material: "STONE", buy-price: 10.0, sell-price: 2.0 }
            cobblestone: { slot: 13, material: "COBBLESTONE", buy-price: 5.0, sell-price: 1.0 }
            deepslate: { slot: 14, material: "DEEPSLATE", buy-price: 12.0, sell-price: 3.0 }
            oak_log: { slot: 15, material: "OAK_LOG", buy-price: 20.0, sell-price: 5.0 }
            spruce_log: { slot: 16, material: "SPRUCE_LOG", buy-price: 20.0, sell-price: 5.0 }
            birch_log: { slot: 19, material: "BIRCH_LOG", buy-price: 20.0, sell-price: 5.0 }
            glass: { slot: 20, material: "GLASS", buy-price: 15.0, sell-price: 3.0 }
            white_wool: { slot: 21, material: "WHITE_WOOL", buy-price: 15.0, sell-price: 3.0 }
            sand: { slot: 22, material: "SAND", buy-price: 10.0, sell-price: 2.0 }
            gravel: { slot: 23, material: "GRAVEL", buy-price: 10.0, sell-price: 2.0 }
            obsidian: { slot: 24, material: "OBSIDIAN", buy-price: 150.0, sell-price: 50.0 }
            netherrack: { slot: 25, material: "NETHERRACK", buy-price: 8.0, sell-price: 1.5 }
            end_stone: { slot: 28, material: "END_STONE", buy-price: 25.0, sell-price: 5.0 }

        # ----------------------------------------------------
        # 2. MINERALS
        # ----------------------------------------------------
        minerals:
          slot: 13
          material: "DIAMOND"
          display-name: "&b&lMinerals"
          title: "&8&lApexShop | Minerals"
          items:
            coal: { slot: 11, material: "COAL", buy-price: 20.0, sell-price: 5.0 }
            raw_copper: { slot: 12, material: "RAW_COPPER", buy-price: 30.0, sell-price: 8.0 }
            raw_iron: { slot: 13, material: "RAW_IRON", buy-price: 50.0, sell-price: 15.0 }
            raw_gold: { slot: 14, material: "RAW_GOLD", buy-price: 100.0, sell-price: 30.0 }
            redstone: { slot: 15, material: "REDSTONE", buy-price: 25.0, sell-price: 6.0 }
            lapis_lazuli: { slot: 20, material: "LAPIS_LAZULI", buy-price: 35.0, sell-price: 10.0 }
            diamond: { slot: 22, material: "DIAMOND", buy-price: 500.0, sell-price: 150.0 }
            emerald: { slot: 24, material: "EMERALD", buy-price: 400.0, sell-price: 120.0 }
            netherite_scrap: { slot: 30, material: "NETHERITE_SCRAP", buy-price: 2500.0, sell-price: 800.0 }
            netherite_ingot: { slot: 32, material: "NETHERITE_INGOT", buy-price: 10000.0, sell-price: 3500.0 }

        # ----------------------------------------------------
        # 3. MOB DROPS
        # ----------------------------------------------------
        mob_drops:
          slot: 15
          material: "ROTTEN_FLESH"
          display-name: "&c&lMob Drops"
          title: "&8&lApexShop | Mob Drops"
          items:
            rotten_flesh: { slot: 10, material: "ROTTEN_FLESH", buy-price: 10.0, sell-price: 2.0 }
            bone: { slot: 11, material: "BONE", buy-price: 15.0, sell-price: 4.0 }
            string: { slot: 12, material: "STRING", buy-price: 15.0, sell-price: 4.0 }
            spider_eye: { slot: 13, material: "SPIDER_EYE", buy-price: 20.0, sell-price: 5.0 }
            gunpowder: { slot: 14, material: "GUNPOWDER", buy-price: 40.0, sell-price: 10.0 }
            ender_pearl: { slot: 15, material: "ENDER_PEARL", buy-price: 150.0, sell-price: 40.0 }
            blaze_rod: { slot: 16, material: "BLAZE_ROD", buy-price: 200.0, sell-price: 50.0 }
            slime_ball: { slot: 21, material: "SLIME_BALL", buy-price: 60.0, sell-price: 15.0 }
            leather: { slot: 22, material: "LEATHER", buy-price: 25.0, sell-price: 6.0 }
            feather: { slot: 23, material: "FEATHER", buy-price: 10.0, sell-price: 2.0 }

        # ----------------------------------------------------
        # 4. FOOD
        # ----------------------------------------------------
        food:
          slot: 29
          material: "GOLDEN_CARROT"
          display-name: "&e&lFood"
          title: "&8&lApexShop | Food"
          items:
            bread: { slot: 11, material: "BREAD", buy-price: 15.0, sell-price: 3.0 }
            cooked_beef: { slot: 12, material: "COOKED_BEEF", buy-price: 30.0, sell-price: 8.0 }
            cooked_porkchop: { slot: 13, material: "COOKED_PORKCHOP", buy-price: 30.0, sell-price: 8.0 }
            cooked_chicken: { slot: 14, material: "COOKED_CHICKEN", buy-price: 25.0, sell-price: 6.0 }
            golden_carrot: { slot: 15, material: "GOLDEN_CARROT", buy-price: 100.0, sell-price: 25.0 }
            golden_apple: { slot: 22, material: "GOLDEN_APPLE", buy-price: 500.0, sell-price: 150.0 }

        # ----------------------------------------------------
        # 5. FARMS
        # ----------------------------------------------------
        farms:
          slot: 31
          material: "WHEAT"
          display-name: "&2&lFarms"
          title: "&8&lApexShop | Farms"
          items:
            wheat: { slot: 10, material: "WHEAT", buy-price: 10.0, sell-price: 2.5 }
            wheat_seeds: { slot: 11, material: "WHEAT_SEEDS", buy-price: 2.0, sell-price: 0.5 }
            carrot: { slot: 12, material: "CARROT", buy-price: 12.0, sell-price: 3.0 }
            potato: { slot: 13, material: "POTATO", buy-price: 12.0, sell-price: 3.0 }
            sugar_cane: { slot: 14, material: "SUGAR_CANE", buy-price: 15.0, sell-price: 4.0 }
            bamboo: { slot: 15, material: "BAMBOO", buy-price: 10.0, sell-price: 2.0 }
            cactus: { slot: 16, material: "CACTUS", buy-price: 15.0, sell-price: 3.5 }
            pumpkin: { slot: 21, material: "PUMPKIN", buy-price: 25.0, sell-price: 6.0 }
            melon_slice: { slot: 22, material: "MELON_SLICE", buy-price: 8.0, sell-price: 2.0 }
            nether_wart: { slot: 23, material: "NETHER_WART", buy-price: 30.0, sell-price: 8.0 }

        # ----------------------------------------------------
        # 6. MISC & TRAIN YARD (Exact Layout)
        # ----------------------------------------------------
        misc:
          slot: 33
          material: "CHEST"
          display-name: "&6&lMisc & Train Yard"
          title: "&8&lApexShop: Train Yard"
          sell-all-button:
            slot: 49
            material: "OAK_PLANKS"
            display-name: "&c&lSELL ALL"
          items:
            minecart:
              slot: 19
              material: "MINECART"
              display-name: "&bMinecart"
              buy-price: 500.0
              sell-price: 250.0
            chest_minecart_1:
              slot: 20
              material: "CHEST_MINECART"
              display-name: "&bMinecart with Chest"
              buy-price: 750.0
              sell-price: 375.0
            chest_minecart_2:
              slot: 21
              material: "CHEST_MINECART"
              display-name: "&bMinecart with Chest"
              buy-price: 750.0
              sell-price: 375.0
            chest_minecart_3:
              slot: 22
              material: "CHEST_MINECART"
              display-name: "&bMinecart with Chest"
              buy-price: 750.0
              sell-price: 375.0
            chest_minecart_4:
              slot: 23
              material: "CHEST_MINECART"
              display-name: "&bMinecart with Chest"
              buy-price: 750.0
              sell-price: 375.0
            chest_minecart_5:
              slot: 28
              material: "CHEST_MINECART"
              display-name: "&bMinecart with Chest"
              buy-price: 750.0
              sell-price: 375.0
            chest_minecart_6:
              slot: 29
              material: "CHEST_MINECART"
              display-name: "&bMinecart with Chest"
              buy-price: 750.0
              sell-price: 375.0
            chest_minecart_7:
              slot: 30
              material: "CHEST_MINECART"
              display-name: "&bMinecart with Chest"
              buy-price: 750.0
              sell-price: 375.0
            chest_mine
Kodari AI
KodariOct 7 at 10:01 am 3
ApexShop
A modern, lightweight, and fully configurable Minecraft shop plugin for Paper/Spigot 1.21+. Players open a category selector GUI via /shop, browse six categories (Blocks, Minerals, Mob Drops, Food, Farms, Misc & Train Yard), and buy or sell items with left/right clicks and shift modifiers. Integrates with Vault for economy support, features a SELL ALL button, back navigation, configurable sounds and messages, and an admin reload command with permission apexshop.admin. All prices, items, slots, and GUI layouts are defined in YAML configuration files for easy customization.
  1. Set up the Kotlin Paper plugin and Vault economy hook.

  2. Add configurable category/item data and the requested menu flows.

  3. Register /shop and /apexshop reload, with buy, sell, and sell-all handling.

Created ApexShop with /shop, /apexshop reload, Vault economy support, configurable menus and prices, and buy, sell, and sell-all interactions.

The pasted category data cuts off at chest_mine...; categories.yml includes the complete entries visible in the attachment, including seven chest minecart entries.

J

cmi economy

Kodari AI
KodariOct 7 at 10:03 am 1
  1. Check the project’s economy integration points and CMI API, then add CMI economy support.

Added CMI to ApexShop’s soft dependencies so it loads before the shop and can register its economy provider. ApexShop uses Vault’s economy API, so Vault must also be installed and CMI’s Vault economy integration enabled.

J

cmi economy

Kodari AI
KodariOct 7 at 10:04 am 1
  1. Keep Vault as the preferred provider, but fall back to CMI’s native economy when Vault has no provider or is absent.

  2. Route shop checks, withdrawals, deposits, and refunds through the selected provider; disable the shop only if neither economy is available.

Added native CMI economy support. ApexShop now prefers a Vault economy provider, falls back to CMI’s economy when one isn’t available, and disables only if neither works.

J

verander alles naar nederlands

Kodari AI
KodariOct 7 at 11:38 am 1
  1. Vertaal alle GUI-teksten, commando-antwoorden en fallback-/logmeldingen naar het Nederlands.

  2. Vertaal de categorieën en standaard itemnamen in categories.yml.

  3. Vertaal de omschrijvingen in plugin.yml; laat commando’s, interne sleutels, materiaal-ID’s en placeholders ongewijzigd.

De zichtbare teksten zijn naar het Nederlands vertaald: GUI-knoppen en lore, categorie- en itemnamen, commando-antwoorden en plug-inomschrijvingen. Bestaande Nederlandse berichten zijn behouden; commando’s, interne sleutels en materiaal-ID’s zijn ongewijzigd gelaten.

J

add hex colors

Kodari AI
KodariOct 7 at 11:52 am 1

Hexkleuren worden nu ondersteund met de notatie &#RRGGBB, bijvoorbeeld &#12ABEF. Dit werkt in berichten, GUI-titels en itemnamen; bestaande &-kleuren blijven werken.

J

maar dan wel gray glass en sluit knop is barrel die kan je ook aanpassen en volgende pagina enzo is ook arrow en die kan ik ook aanpassen lores enzo en de terug knop ook in hoofd gui ook sluit knop barrel en kan ik ook aanpassen laat hex colorcodes ook werken en de itemlores moeten zo die kan ik ook aanpassen zo voor item ding die kan ik ook aanpassen en zorg dat er ook een /sellgui is die ik ook kan aanpassen helemaal

1 image attached
Kodari AI
KodariOct 7 at 12:01 pm 2
  1. Maak de bestaande shop-GUI volledig instelbaar: rand, knoppen, itemlore en hexkleuren.

  2. Voeg een configureerbare /sellgui toe.

  1. De shop-GUI is instelbaar via categories.yml: grijs glas, hoofdmenu-titel en barrel-sluitknop, terugknop, pagina-pijlen en hun lores. Pas algemene itemlore aan bij gui.item-lore.default, of geef een item een eigen lore:-lijst. Met page: kun je items over pagina’s verdelen.

  2. /sellgui is toegevoegd. Het toont items met een verkoopprijs; links verkoopt alle exemplaren van dat item en rechts één. De titel, grootte, itemposities, opvulling, knoppen, lores en individuele items kun je instellen onder sellgui: in categories.yml. Gebruik bijvoorbeeld sellgui.items.blocks.grass_block om een knop aan te passen of enabled: false om die te verbergen.

  3. Hexkleuren zoals &#18ABEF werken ook in deze instellingen, inclusief titels, namen en lores.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle.kts
manifest.kod
settings.gradle.kts
Code
11 1,172
src/main/kotlin/com/apexshop/ApexShopPlugin.kt
package com.apexshop

import net.milkbowl.vault.economy.Economy
import org.bukkit.Bukkit
import org.bukkit.ChatColor
import org.bukkit.Material
import org.bukkit.Sound
import org.bukkit.configuration.ConfigurationSection
import org.bukkit.configuration.file.YamlConfiguration
import org.bukkit.entity.Player
import org.bukkit.inventory.Inventory
import org.bukkit.inventory.ItemStack
import org.bukkit.plugin.java.JavaPlugin
import java.io.File
import java.math.BigDecimal
import java.util.Locale

class ApexShopPlugin : JavaPlugin() {
    private lateinit var economy: ShopEconomy

    var categories: List<ShopCategory> = emptyList()
        private set

    private lateinit var categoriesFile: File
    private lateinit var categoriesConfig: YamlConfiguration
    private var sellAllSlot = 49
    private var sellAllMaterial = Material.OAK_PLANKS
    private var sellAllName = "&c&lVERKOOP ALLES"
    private var sellAllLore = emptyList<String>()
    private var mainMenuTitle = "&8&lApexShop | Categorieën"
    private var fillerMaterial = Material.GRAY_STAINED_GLASS_PANE
    private var fillerName = " "
    private var fillerLore = emptyList<String>()
    private var categoryLore = listOf("&7Klik om te bekijken")
    private var defaultItemLore = listOf(
        "&6Koop 1 voor &a$%buy_price%",
        "&cVerkoop 1 voor &e$%sell_price%",
        "&eLinkermuisknop: kopen | Rechtermuisknop: verkopen"
    )
    private var closeButton = ShopButton(49, Material.BARREL, "&c&lSluiten")
    private var backButton = ShopButton(48, Material.ARROW, "&eTerug naar categorieën")
    private var previousPageButton = ShopButton(45, Material.ARROW, "&eVorige pagina")
    private var nextPageButton = ShopButton(53, Material.ARROW, "&eVolgende pagina")
    private var sellGuiTitle = "&8&lItems verkopen"
    private var sellGuiSize = 54
    private var sellGuiItemSlots: List<Int> = emptyList()
    private var sellGuiFillerMaterial = Material.GRAY_STAINED_GLASS_PANE
    private var sellGuiFillerName = " "
    private var sellGuiFillerLore = emptyList<String>()
    private var sellGuiCloseButton = ShopButton(49, Material.BARREL, "&c&lSluiten")
    private var sellGuiSellAllButton = ShopButton(50, Material.OAK_PLANKS, "&c&lVERKOOP ALLES")
    private var sellGuiPreviousButton = ShopButton(45, Material.ARROW, "&eVorige pagina")
    private var sellGuiNextButton = ShopButton(53, Material.ARROW, "&eVolgende pagina")
    private var sellGuiDefaultLore = listOf("&7Klik om alle items te verkopen", "&eRechtsklik: verkoop 1")
    private var sellGuiEntries: List<SellGuiEntry> = emptyList()
    private val itemNames = mapOf(
        "grass_block" to "Grasblok",
        "dirt" to "Aarde",
        "stone" to "Steen",
        "cobblestone" to "Keien",
        "deepslate" to "Diepe leisteen",
        "oak_log" to "Eikenstam",
        "spruce_log" to "Sparrenstam",
        "birch_log" to "Berkenstam",
        "glass" to "Glas",
        "white_wool" to "Witte wol",
        "sand" to "Zand",
        "gravel" to "Grind",
        "obsidian" to "Obsidiaan",
        "netherrack" to "Nethersteen",
        "end_stone" to "Endsteen",
        "coal" to "Steenkool",
        "raw_copper" to "Ruw koper",
        "raw_iron" to "Ruw ijzer",
        "raw_gold" to "Ruw goud",
        "redstone" to "Redstone",
        "lapis_lazuli" to "Lapis lazuli",
        "diamond" to "Diamant",
        "emerald" to "Smaragd",
        "netherite_scrap" to "Netherietschroot",
        "netherite_ingot" to "Netherietstaaf",
        "rotten_flesh" to "Rot vlees",
        "bone" to "Bot",
        "string" to "Draad",
        "spider_eye" to "Spinneoog",
        "gunpowder" to "Buskruit",
        "ender_pearl" to "Enderparel",
        "blaze_rod" to "Blazestaaf",
        "slime_ball" to "Slijmbal",
        "leather" to "Leer",
        "feather" to "Veer",
        "bread" to "Brood",
        "cooked_beef" to "Gebakken rundvlees",
        "cooked_porkchop" to "Gebakken varkenskotelet",
        "cooked_chicken" to "Gebakken kip",
        "golden_carrot" to "Gouden wortel",
        "golden_apple" to "Gouden appel",
        "wheat" to "Tarwe",
        "wheat_seeds" to "Tarwezaden",
        "carrot" to "Wortel",
        "potato" to "Aardappel",
        "sugar_cane" to "Suikerriet",
        "bamboo" to "Bamboe",
        "cactus" to "Cactus",
        "pumpkin" to "Pompoen",
        "melon_slice" to "Meloenplak",
        "nether_wart" to "Netherwart",
        "minecart" to "Mijnkar",
        "chest_minecart_1" to "Mijnkar met kist",
        "chest_minecart_2" to "Mijnkar met kist",
        "chest_minecart_3" to "Mijnkar met kist",
        "chest_minecart_4" to "Mijnkar met kist",
        "chest_minecart_5" to "Mijnkar met kist",
        "chest_minecart_6" to "Mijnkar met kist",
        "chest_minecart_7" to "Mijnkar met kist"
    )

    override fun onEnable() {
        saveDefaultConfig()
        categoriesFile = File(dataFolder, "categories.yml")
        if (!categoriesFile.exists()) saveResource("categories.yml", false)
        reloadShopData()

        val vaultProvider = if (server.pluginManager.getPlugin("Vault")?.isEnabled == true) {
            server.servicesManager.getRegistration(Economy::class.java)?.provider
        } else {
            null
        }
        val selectedEconomy = vaultProvider?.let(::VaultShopEconomy) ?: createCmiEconomy()
        if (selectedEconomy == null) {
            logger.severe("Geen Vault-economieprovider of ingeschakelde CMI-economie beschikbaar; ApexShop wordt uitgeschakeld.")
            server.pluginManager.disablePlugin(this)
            return
        }
        economy = selectedEconomy

        val commandHandler = ShopCommand(this)
        getCommand("shop")?.setExecutor(commandHandler)
        getCommand("sellgui")?.setExecutor(commandHandler)
        getCommand("apexshop")?.setExecutor(commandHandler)
        getCommand("apexshop")?.tabCompleter = commandHandler
        server.pluginManager.registerEvents(ShopListener(this), this)
    }

    fun reloadShopData() {
        reloadConfig()
        categoriesConfig = YamlConfiguration.loadConfiguration(categoriesFile)
        val root = categoriesConfig.getConfigurationSection("categories")
        categories = root?.let(::loadCategories) ?: emptyList()

        mainMenuTitle = categoriesConfig.getString("gui.main-menu.title") ?: "&8&lApexShop | Categorieën"
        val filler = categoriesConfig.getConfigurationSection("gui.filler")
        fillerMaterial = filler?.getString("material")?.let { Material.matchMaterial(it) }
            ?: Material.GRAY_STAINED_GLASS_PANE
        fillerName = filler?.getString("display-name") ?: " "
        fillerLore = filler?.getStringList("lore") ?: emptyList()
        categoryLore = categoriesConfig.getStringList("gui.category-lore")
            .takeIf { categoriesConfig.contains("gui.category-lore") } ?: listOf("&7Klik om te bekijken")
        defaultItemLore = categoriesConfig.getStringList("gui.item-lore.default")
            .takeIf { categoriesConfig.contains("gui.item-lore.default") } ?: listOf(
            "&6Koop 1 voor &a$%buy_price%",
            "&cVerkoop 1 voor &e$%sell_price%",
            "&eLinkermuisknop: kopen | Rechtermuisknop: verkopen"
        )
        closeButton = loadButton("gui.main-menu.close-button", ShopButton(49, Material.BARREL, "&c&lSluiten"))
        backButton = loadButton("gui.category-menu.back-button", ShopButton(48, Material.ARROW, "&eTerug naar categorieën"))
        previousPageButton = loadButton("gui.category-menu.previous-button", ShopButton(45, Material.ARROW, "&eVorige pagina"))
        nextPageButton = loadButton("gui.category-menu.next-button", ShopButton(53, Material.ARROW, "&eVolgende pagina"))

        val sellButton = categoriesConfig.getConfigurationSection("categories.misc.sell-all-button")
        sellAllSlot = sellButton?.getInt("slot", 49)?.takeIf { it in 0..53 } ?: 49
        sellAllMaterial = sellButton?.getString("material")
            ?.let { Material.matchMaterial(it) }
            ?: Material.OAK_PLANKS
        sellAllName = sellButton?.getString("display-name") ?: "&c&lVERKOOP ALLES"
        sellAllLore = sellButton?.getStringList("lore") ?: emptyList()

        sellGuiTitle = categoriesConfig.getString("sellgui.title") ?: "&8&lItems verkopen"
        sellGuiSize = categoriesConfig.getInt("sellgui.size", 54).takeIf { it in 9..54 && it % 9 == 0 } ?: 54
        sellGuiItemSlots = if (categoriesConfig.contains("sellgui.item-slots")) {
            categoriesConfig.getIntegerList("sellgui.item-slots").filter { it in 0 until sellGuiSize }.distinct()
        } else {
            val rowCount = sellGuiSize / 9
            (0 until sellGuiSize).filter { slot ->
                slot / 9 in 1 until rowCount - 1 && slot % 9 in 1..7
            }
        }
        val sellGuiFiller = categoriesConfig.getConfigurationSection("sellgui.filler")
        sellGuiFillerMaterial = sellGuiFiller?.getString("material")?.let { Material.matchMaterial(it) }
            ?: Material.GRAY_STAINED_GLASS_PANE
        sellGuiFillerName = sellGuiFiller?.getString("display-name") ?: " "
        sellGuiFillerLore = sellGuiFiller?.getStringList("lore") ?: emptyList()
        sellGuiCloseButton = loadButton(
            "sellgui.close-button",
            ShopButton(sellGuiSize - 5, Material.BARREL, "&c&lSluiten"),
            sellGuiSize
        )
        sellGuiSellAllButton = loadButton(
            "sellgui.sell-all-button",
            ShopButton(sellGuiSize - 4, Material.OAK_PLANKS, "&c&lVERKOOP ALLES"),