Njan Kl

Make a Paper 26.1.2 plugin with a fully GUI-based report system. Use only small-caps text in-game.

* /report opens a paginated GUI showing all players who have joined the server. * Clicking a player opens an easy text-input box where the reporter enters the reason. * Submitting creates a report. * /report list opens a GUI showing submitted reports. * Only OPs or players with the required permission can use /report list. * Reports should show the reported player, reporter, reason, and useful details. * Player lists and report lists must support multiple pages with Next/Previous buttons. * Make the GUI clean, simple, and easy to understand. * Include permissions and configuration if needed. * Make it a normal compiled .jar plugin for Paper 26.1.2.

Kodari AI
KodariSep 16 at 1:36 pm 2
ReportSystemGUI
A GUI-based report plugin for Paper servers. Players use /report to open a paginated player list, click a player to enter a reason via chat prompt, and submit a report. Admins with report.view permission or OP status use /report list to browse all reports in a paginated GUI showing reporter, reported player, reason, timestamp, and server. Features configurable permissions, multi-page navigation with Next/Previous buttons, and a clean small-caps interface. Reports persist in memory with optional flat-file storage.
  1. Set up a Paper 26.1.2 Gradle plugin with the required manifest, permissions, and configurable GUI text.

  2. Add persistent player/report models and storage.

  3. Add paginated player/report GUIs with small-caps formatting.

  4. Add Paper text-input reporting flow, commands, listeners, and registration.

The initial source set is in place. I’m correcting two GUI details before finishing: preserving legacy color codes while applying small-caps, and calculating navigation from the filtered player list rather than the raw offline-player count.1. Created a Paper 26.1.2 Gradle plugin project with Java 25 support and compiled .jar configuration. 2. Added /report and /report list commands with OP/permission protection. 3. Added paginated GUI player selection and paginated submitted-report views. 4. Added Paper Dialog API text input for entering report reasons. 5. Added persistent YAML report storage in reports.yml. 6. Added configurable GUI text, messages, permissions, and dialog labels. 7. Applied small-caps formatting to all in-game text while preserving color codes.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
11 663
src/main/java/com/kodari/reports/KodariReportsPlugin.java
package com.kodari.reports;

import com.kodari.reports.data.ReportStore;
import com.kodari.reports.gui.ReportGui;
import com.kodari.reports.util.SmallCaps;
import io.papermc.paper.connection.PlayerGameConnection;
import io.papermc.paper.dialog.Dialog;
import io.papermc.paper.dialog.DialogResponseView;
import io.papermc.paper.event.player.PlayerCustomClickEvent;
import io.papermc.paper.registry.data.dialog.ActionButton;
import io.papermc.paper.registry.data.dialog.DialogBase;
import io.papermc.paper.registry.data.dialog.action.DialogAction;
import io.papermc.paper.registry.data.dialog.body.DialogBody;
import io.papermc.paper.registry.data.dialog.input.DialogInput;
import io.papermc.paper.registry.data.dialog.type.DialogType;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.text.Component;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

public final class KodariReportsPlugin extends JavaPlugin {
    public static final Key SUBMIT_REPORT = Key.key("kodarireports:submit_report");

    private final Map<UUID, UUID> pendingTargets = new HashMap<>();
    private ReportStore reportStore;
    private ReportGui reportGui;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        this.reportStore = new ReportStore(this);
        this.reportGui = new ReportGui(this, reportStore);

        ReportListener listener = new ReportListener(this);
        Bukkit.getPluginManager().registerEvents(listener, this);

        ReportCommand command = new ReportCommand(this);
        if (getCommand("report") != null) {
            getCommand("report").setExecutor(command);
            getCommand("report").setTabCompleter(command);
        }
    }

    public ReportGui getReportGui() {
        return reportGui;
    }

    public ReportStore getReportStore() {
        return reportStore;
    }

    public void openReasonDialog(Player reporter, UUID target) {
        String playerName = Bukkit.getOfflinePlayer(target).getName();
        if (playerName == null) {
            reporter.sendMessage(message("messages.invalid-target"));
            return;
        }

        pendingTargets.put(reporter.getUniqueId(), target);
        String title = configText("dialog.title").replace("%player%", playerName);
        String body = configText("dialog.body").replace("%player%", playerName);

        Dialog dialog = Dialog.create(builder -> builder.empty()
                .base(DialogBase.builder(Component.text(title))
                        .pause(false)
                        .afterAction(DialogBase.DialogAfterAction.CLOSE)
                        .canCloseWithEscape(true)
                        .body(List.of(DialogBody.plainMessage(Component.text(body))))
                        .inputs(List.of(DialogInput.text("reason", Component.text(configText("dialog.reason-label")))
                                .width(320)
                                .maxLength(500)
                                .multiline(io.papermc.paper.registry.data.dialog.input.TextDialogInput.MultilineOptions.create(6, 100))
                                .build()))
                        .build())
                .type(DialogType.confirmation(
                        ActionButton.builder(Component.text(configText("dialog.submit")))
                                .width(140)
                                .action(DialogAction.customClick(SUBMIT_REPORT, null))
                                .build(),
                        ActionButton.create(Component.text(configText("dialog.cancel")), null, 140, null))));

        reporter.showDialog(dialog);
    }

    public void handleDialogSubmit(PlayerCustomClickEvent event) {
        if (!SUBMIT_REPORT.equals(event.getIdentifier())) {
            return;
        }
        if (!(event.getCommonConnection() instanceof PlayerGameConnection connection)) {
            return;
        }

        Player reporter = connection.getPlayer();
        UUID target = pendingTargets.remove(reporter.getUniqueId());
        DialogResponseView response = event.getDialogResponseView();
        if (target == null || response == null) {
            return;
        }

        String reason = response.getText("reason");
        if (reason == null || reason.trim().isEmpty()) {
            reporter.sendMessage(message("messages.empty-reason"));
            return;
        }

        String targetName = Bukkit.getOfflinePlayer(target).getName();
        if (targetName == null) {
            reporter.sendMessage(message("messages.invalid-target"));
            return;
        }

        reportStore.add(new Report(UUID.randomUUID(), target, reporter.getUniqueId(), reason.trim(), System.currentTimeMillis()));
        reporter.sendMessage(message("messages.submitted").replace("%player%", targetName));
    }

    public String configText(String path) {
        return SmallCaps.format(getConfig().getString(path, path).replace('&', '§'));
    }

    public String message(String path) {
        return configText(path);
    }
}