matumaka

Make a notes plugin. Name of it is NotesGUI. /notes add <player> <note - can have spaces between> then /notes view <player> and /notes remove <player> <note ID> and finally /notes reload. The perms are notesgui.remove notesgui.add notesgui.view notesgui.reload. /notes view <player> opens a INVENTORY GUI what you can edit it config.yml. config.yml also has the ways to save the data. MySql, redis or yml. All messages are in messages.yml and have legacy and minimessage support. For the notes..make it so you can't use colorcodes. Also make it so when a player joins and has a note it sends the message that a player has a note to all players where the input has permission notesgui.notify

Kodari AI
KodariMay 17 at 1:36 pm 405 (v2)
NotesGUI
A staff notes plugin allowing players with permissions to add, view, and remove notes on other players. Features a configurable inventory GUI for viewing notes, multi-storage backend support (MySQL, Redis, YML), and join notifications for noted players. Messages support both legacy (&) and MiniMessage formatting. Notes are stripped of color codes. Commands: /notes add/view/remove/reload with granular permissions.

Let me plan all class dependencies before writing any code:

  • NotesGUI (main) → holds managers, GUIManager

  • ConfigManager → reads config.yml (storage type, GUI settings)

  • MessageManager → reads messages.yml, supports legacy + MiniMessage

  • StorageManager (interface) → YMLStorage, MySQLStorage, RedisStorage

  • NoteData → data class (noteId, authorName, noteText, timestamp)

  • NotesManager → wraps StorageManager, business logic

  • NotesCommand → handles /notes subcommands

  • JoinListener → fires notify on join

  • GUI framework: InventoryHandler, InventoryButton, InventoryGUI, GUIManager, GUIListener

  • NotesViewGUI → extends InventoryGUI, shows notes for a player

  • ColorUtil → legacy + MiniMessage colorize

Now I have everything I need. Let me create all files:

[Generation stopped]

matumaka

use paper api

Kodari AI
KodariMay 17 at 1:40 pm 24,751 (v2)

I can see the project is partially generated — it’s missing several files: NotesCommand, JoinListener, GUIListener, GUIManager, NotesViewGUI, and InventoryButton is truncated. I also need to switch everything to Paper API. Let me build all missing/incomplete files and

Now I have a full picture. Here’s the plan:

  • Switch build.gradle to Paper API, add HikariCP + Jedis deps

  • Fix InventoryButton (truncated), update all files to use Paper’s Adventure API natively (drop CommandSender.sendMessage(Component) — already works on Paper)

  • Create missing: NotesCommand, JoinListener, GUIListener, GUIManager, NotesViewGUI

  • Update plugin.yml api-version to 1.20, MessageManager to use Paper’s native Adventure

  • manifest.kod for hikari-cp + jedis

Now fix InventoryButton (truncated) and update MessageManager to use Paper’s native Adventure properly:

Now update MessageManager to use Paper’s native Adventure (no legacy ChatColor import needed, cleaner colorize), update plugin.yml, and create all missing classes:

Now create all missing files:

Now update NotesGUI.java to expose getMessageManager() (it already does via Lombok) — but we need to verify the reload() method properly closes the old storage before replacing it:

Now I’ll write all the missing files properly:

Here’s a summary of everything that was done:

New files created:

  • build.gradle — Paper API (paper-api 1.20.4), HikariCP, Jedis, Lombok

  • manifest.kod — declares hikari-cp and jedis for the build system

  • plugin.yml — updated api-version to 1.20

  • InventoryGUI — abstract base class for inventory GUIs with slot→button mapping

  • GUIManager — tracks which GUI each player has open

  • GUIListener — routes click/open/close events to the correct InventoryGUI

  • NotesViewGUI — fully config-driven note viewer; left-clicking a note removes it (requires notesgui.remove)

  • NotesCommand — handles add/view/remove/reload with tab completion; add strips all &x/§x color codes from note text

  • JoinListener — on join, notifies all online players with notesgui.notify if the joining player has notes

Files patched:

  • InventoryButton — completed the truncated class (added getIcon, onClick)

  • MessageManager — removed ChatColor import, cleaned up colorize logic for Paper’s native Adventure API

  • NotesGUI#reload() — now properly closes old storage before swapping to the new one

matumaka

remove @Getter and @Setter and replace it with long form functions ig. Also make it with Paper API. So commands and shit

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
22 1,245
src/main/java/com/notesgui/NotesGUI.java
package com.notesgui;

import com.notesgui.command.NotesCommand;
import com.notesgui.config.ConfigManager;
import com.notesgui.config.MessageManager;
import com.notesgui.inventory.gui.GUIListener;
import com.notesgui.inventory.gui.GUIManager;
import com.notesgui.listener.JoinListener;
import com.notesgui.storage.NotesManager;
import com.notesgui.storage.StorageManager;
import com.notesgui.storage.impl.MySQLStorage;
import com.notesgui.storage.impl.RedisStorage;
import com.notesgui.storage.impl.YMLStorage;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

public class NotesGUI extends JavaPlugin {

    @Getter private static NotesGUI instance;
    @Getter private ConfigManager configManager;
    @Getter private MessageManager messageManager;
    @Getter private GUIManager guiManager;
    @Getter private NotesManager notesManager;

    @Override
    public void onEnable() {
        instance = this;

        saveDefaultConfig();

        configManager = new ConfigManager(this);
        messageManager = new MessageManager(this);

        StorageManager storage = buildStorage();
        storage.init();
        notesManager = new NotesManager(storage);

        guiManager = new GUIManager();

        getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);
        getServer().getPluginManager().registerEvents(new JoinListener(this), this);

        NotesCommand notesCommand = new NotesCommand(this);
        getCommand("notes").setExecutor(notesCommand);
        getCommand("notes").setTabCompleter(notesCommand);

        getLogger().info("NotesGUI enabled.");
    }

    @Override
    public void onDisable() {
        if (notesManager != null) {
            notesManager.getStorage().close();
        }
        getLogger().info("NotesGUI disabled.");
    }

    public void reload() {
        reloadConfig();
        configManager.reload();
        messageManager.reload();

        StorageManager oldStorage = notesManager.getStorage();
        StorageManager newStorage = buildStorage();
        newStorage.init();
        notesManager.setStorage(newStorage);
        oldStorage.close();
    }

    private StorageManager buildStorage() {
        String type = configManager.getStorageType();
        switch (type.toLowerCase()) {
            case "mysql":
                return new MySQLStorage(this);
            case "redis":
                return new RedisStorage(this);
            default:
                return new YMLStorage(this);
        }
    }
}