2n68

Make this plugin for me https://builtbybit.com/resources/customenderchest2.80916/

Kodari AI
KodariJul 18 at 2:23 pm 2

I’ll build a custom multi-page ender chest plugin with persistent storage, permission-based sizing, and admin controls.

CustomEnderChest
A customizable ender chest plugin with multi-page support, configurable row sizes, permission-based access, SQLite/MySQL storage, item blacklist, and admin inspection tools. Players can store items across multiple pages with different sizes, each persisting between sessions. Features GUI-based page selection, sound effects, and full configuration.

Looking at the code, I notice the EnderChestCommand and AdminEnderChestCommand have incorrect import paths — they reference com.customenderchest.impl.EnderChestGUI and com.customenderchest.impl.EnderChestSelectorGUI but those classes are in com.customenderchest.inventory.impl. Let me fix those.

Now I need to fix the EnderChestGUI — it references getButtonMap() in its onClick method, but InventoryGUI stores buttonMap as private. I need to add a getter for it.

The EnderChestGUI.onOpen calls this.decorate(player) but the base InventoryGUI.onOpen also calls decorate. Since EnderChestGUI overrides onOpen, the base class’s onOpen won’t be called — that’s correct. But I should make sure the EnderChestGUI.onOpen doesn’t call super.onOpen (which it doesn’t).

Also, I need to check — the EnderChestGUI.onOpen already calls this.decorate(player), which is fine. The EnderChestSelectorGUI doesn’t override onOpen, so it will use the base class’s onOpen which calls decorate. That’s also fine.

Let me verify the project structure is complete. All files created:

  1. ✅ build.gradle

  2. ✅ manifest.kod

  3. ✅ src/main/resources/plugin.yml

  4. ✅ src/main/resources/config.yml

  5. ✅ CustomEnderChest.java

  6. ✅ ConfigManager.java

  7. ✅ DataManager.java

  8. ✅ SQLiteDataManager.java

  9. ✅ MySQLDataManager.java

  10. ✅ InventoryHandler.java

  11. ✅ InventoryButton.java

  12. ✅ InventoryGUI.java

  13. ✅ GUIManager.java

  14. ✅ GUIListener.java

  15. ✅ EnderChestGUI.java

  16. ✅ EnderChestSelectorGUI.java

  17. ✅ EnderChestCommand.java

  18. ✅ AdminEnderChestCommand.java

  19. ✅ MessageUtil.java

  20. ✅ ItemSerializer.java

The project is complete. Let me summarize what was built.

2n68

Make the author PKAH also make it have a config

Kodari AI
KodariJul 18 at 2:27 pm 3

Author to PKAH, expanding the config with more options.

Now update the GUI classes to use configurable titles/materials and add the auto-save and drop prevention features.

Now add the auto-save task and drop prevention listener to the main plugin class

Now I need to create the drop listener and fix the auto-save to actually be useful.

Now create the drop listener and add the blacklist check to the click handler.

2n68

Remake the .jar PkahsEnderchest

Kodari AI
KodariJul 18 at 3:36 pm 3

Let me re-read the resource page to make sure I nail the features.

I have the full project. I’ll rename everything from CustomEnderChest / com.customenderchest to PkahsEnderchest / com.pkahsenderchest

The package/class rename is handled automatically. Now I need to update build.gradle group, plugin.yml name/main/author, and any references inside files.

Now update build.gradle group, plugin.yml name/main/author, and the plugin class name.

Now update the Java files — rename the main class and update all references.

Now delete the old directory:

Verify the final tree:

Need to delete the leftover CustomEnderChest.java and verify all files reference the new package/class name

The old CustomEnderChest.java is still around as a duplicate. Let me delete it and fix a minor usage message typo.

All done. Project renamed to PkahsEnderchest:

  • Package: com.pkahsenderchest

  • Main class: PkahsEnderchest

  • Plugin name: PkahsEnderchest

  • Author: PKAH

  • Commands: /pec (aliases: penderchest) and /pecadmin (aliases: pecadmin, peca)

  • Permissions: pkahsenderchest.use, pkahsenderchest.admin, pkahsenderchest.size.1-6, pkahsenderchest.pages.1/2/3/5/10

  • Config: fully featured with storage type (SQLite/MySQL), GUI titles/colors, sound customization, auto-save, drop prevention, and item blacklist

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
20 1,249
src/main/java/com/pkahsenderchest/PkahsEnderchest.java
package com.pkahsenderchest;

import com.pkahsenderchest.commands.AdminEnderChestCommand;
import com.pkahsenderchest.commands.EnderChestCommand;
import com.pkahsenderchest.config.ConfigManager;
import com.pkahsenderchest.data.DataManager;
import com.pkahsenderchest.data.MySQLDataManager;
import com.pkahsenderchest.data.SQLiteDataManager;
import com.pkahsenderchest.inventory.gui.GUIListener;
import com.pkahsenderchest.inventory.gui.GUIManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class PkahsEnderchest extends JavaPlugin {

    private ConfigManager configManager;
    private DataManager dataManager;
    private GUIManager guiManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        this.configManager = new ConfigManager(this);

        String storageType = getConfig().getString("storage.type", "sqlite");
        if (storageType.equalsIgnoreCase("mysql")) {
            this.dataManager = new MySQLDataManager(this);
        } else {
            this.dataManager = new SQLiteDataManager(this);
        }
        this.dataManager.initialize();

        this.guiManager = new GUIManager();
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);

        getCommand("pkahsenderchest").setExecutor(new EnderChestCommand(this));
        getCommand("pkahsenderchestadmin").setExecutor(new AdminEnderChestCommand(this));

        startAutoSave();

        getLogger().info("PkahsEnderchest v" + getDescription().getVersion() + " enabled!");
    }

    @Override
    public void onDisable() {
        if (dataManager != null) {
            dataManager.close();
        }
        Bukkit.getScheduler().cancelTasks(this);
    }

    private void startAutoSave() {
        int interval = configManager.getAutoSaveInterval();
        if (interval <= 0) return;

        Bukkit.getScheduler().runTaskTimerAsynchronously(this, () -> {
            guiManager.getActiveInventories().forEach((inv, handler) -> {
                if (handler instanceof com.pkahsenderchest.inventory.impl.EnderChestGUI) {
                    com.pkahsenderchest.inventory.impl.EnderChestGUI ecGUI =
                        (com.pkahsenderchest.inventory.impl.EnderChestGUI) handler;
                    ecGUI.forceSave();
                }
            });
        }, interval * 20L, interval * 20L);
    }
}