Vishal Goswami
📎 1 file 3,085 chars
📄
pasted-code-1794557240513.txt
txt 72 lines
▶
# Minecraft Plugin Development Prompt – SASTI SMP Custom Pause Menu

Create a **fully functional, professional Minecraft plugin** that replaces the default Minecraft pause menu (ESC menu) with a custom **SASTI SMP branded pause menu**.

## 1. Main Objective
Whenever a player presses the **ESC (Escape) key**, display a custom SASTI SMP pause menu instead of the default Minecraft pause menu.

The menu should feature the official SASTI SMP logo prominently in the center or upper section.

## 2. Custom UI Design
- Display the SASTI SMP logo as the main branding element.
- Use a premium Minecraft-inspired UI design.
- Theme: Dark black, red, and gold.
- Add stylish buttons with smooth hover effects.
- Use a clean, modern, professional layout.
- Ensure all text is readable and properly aligned.

## 3. Menu Buttons

Include the following buttons:

1. **RESUME GAME** – Close the pause menu and return to gameplay.
2. **SASTI SMP SERVER** – Display server information.
3. **DISCORD** – Show the SASTI SMP Discord invitation link.
4. **SETTINGS** – Open Minecraft settings.
5. **FEEDBACK** – Display a feedback message or website.
6. **QUIT GAME** – Allow players to leave the game.

## 4. Technical Requirements
- Platform: Minecraft Java Edition.
- Server software: Paper / Spigot / Purpur.
- Develop using Java.
- Support modern Minecraft versions.
- Optimize performance and minimize server resource usage.
- Avoid unnecessary background tasks.
- Include configurable messages, logo assets, and menu settings.
- Provide a configuration file (`config.yml`).
- Include proper permissions and error handling.

## 5. Important Technical Limitation
Minecraft server-side Paper/Spigot plugins cannot directly replace the client's native ESC pause screen or detect the physical ESC key.

Therefore, implement this feature using a compatible client-side mod, resource pack, or custom launcher alongside the server plugin.

**Preferred solution:** Develop a client-side Fabric mod that intercepts the ESC key and replaces the native pause screen with the custom SASTI SMP menu. The server plugin should provide server information and handle supported server-side interactions.

## 6. Branding Assets
I will provide:
- Official SASTI SMP logo (PNG).
- Server name: SASTI SMP.
- Server IP: [INSERT SERVER IP].
- Discord link: [INSERT DISCORD LINK].

Use the actual logo without changing its original design.

## 7. Deliverables
Provide:
- Complete working source code.
- Compiled `.jar` server plugin.
- Fabric client mod `.jar` if required.
- Resource pack and UI assets.
- Installation instructions.
- Configuration file.
- Compatibility information.
- Step-by-step testing instructions.

## 8. Final Requirement
The final result must be a genuinely working custom SASTI SMP pause menu, not just a server inventory GUI or screenshot.

When players press ESC, they should see the SASTI SMP branded menu instead of the default Minecraft pause screen. Pressing Resume should return them to the game smoothly.

**Prioritize functionality, compatibility, performance, and premium UI design.**
Kodari AI
KodariNov 13 at 8:08 am 1
SastiPauseMenu
A server-side Paper plugin for SASTI SMP that provides a custom branded pause menu experience. Since server plugins cannot intercept the client's native ESC key, this plugin delivers the server-side component: a configurable GUI-based menu accessible via command or hotkey that displays the SASTI SMP logo, themed dark black/red/gold UI with premium buttons for Resume Game, Server Info, Discord link, Settings, Feedback, and Quit Game. Includes config.yml for customizable messages, server IP, Discord URL, and menu settings. Features permission-based access, error handling, and lightweight performance with no background tasks. Uses the Adventure MiniMessage ColorUtil for modern text formatting and a reusable InventoryGUI framework with button-based click handling. Designed to pair with a client-side Fabric mod or resource pack for full ESC-key replacement.

This is a Java server-plugin project, and a server plugin cannot intercept the client’s Escape key or replace its pause screen. The custom menu needs a Fabric client mod; Kodari supports Fabric for Minecraft 26.3, 26.2, 1.21.11, 1.21.4, 1.20.4, 1.19.4, and 1.18.2. Which version do you want?

Vishal Goswami

create

Kodari AI
KodariNov 13 at 8:11 am 1

This project is for Java server plugins, but replacing the Escape pause screen requires a client-side Fabric mod. Kodari supports Fabric for Minecraft 26.3, 26.2, 1.21.11, 1.21.4, 1.20.4, 1.19.4, and 1.18.2—which version should the new project target?

Vishal Goswami

26.3

Kodari AI
KodariNov 13 at 8:12 am 1

This project is for Java server plugins; replacing the Escape menu requires a Fabric client mod. Kodari supports Fabric for Minecraft 26.3: Switch to Fabric mod for Minecraft 26.3

Vishal Goswami

plugin

Kodari AI
KodariNov 13 at 8:19 am 2

Plan:

  1. Verify the 26.3 pause-screen hook and the exact Minecraft/Fabric APIs.

  2. Build the ESC-intercepting client mod and branded owo-ui menu.

  3. Add the 26.3 build metadata and dependency manifest.

Created the Fabric 26.3 client mod. Pressing Escape opens the SASTI SMP-styled pause menu, with Resume, server info, Discord, Settings, Feedback, and Quit Game actions. The info fields are read from config/sasti-pause-menu.properties, created on first launch.

The official logo PNG wasn’t attached, so the menu currently uses a SASTI SMP text wordmark. Upload the logo to use the original artwork; Studio generation is also available if enabled under Settings → Generation. This is a client mod, not a Paper/Spigot server plugin.

To get the mod jar, click Compile in the top bar, then Compile in the window that opens; when it succeeds, click Download.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
manifest.kod
settings.gradle
Code
9 323
src/client/java/com/sasti/smp/pausemenu/SastiPauseMenuScreen.java
package com.sasti.smp.pausemenu;

import io.wispforest.owo.ui.base.BaseOwoScreen;
import io.wispforest.owo.ui.component.ButtonComponent;
import io.wispforest.owo.ui.component.LabelComponent;
import io.wispforest.owo.ui.component.UIComponents;
import io.wispforest.owo.ui.container.FlowLayout;
import io.wispforest.owo.ui.container.UIContainers;
import io.wispforest.owo.ui.core.Color;
import io.wispforest.owo.ui.core.HorizontalAlignment;
import io.wispforest.owo.ui.core.Insets;
import io.wispforest.owo.ui.core.OwoUIAdapter;
import io.wispforest.owo.ui.core.Sizing;
import io.wispforest.owo.ui.core.Surface;
import io.wispforest.owo.ui.core.VerticalAlignment;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.options.OptionsScreen;
import net.minecraft.network.chat.Component;
import org.jetbrains.annotations.NotNull;

import java.util.List;

public final class SastiPauseMenuScreen extends BaseOwoScreen<FlowLayout> {

    private static final int GOLD = 0xD7B15B;
    private static final int MUTED = 0xA9A4A1;
    private FlowLayout root;
    private final SastiPauseMenuConfig config;

    public SastiPauseMenuScreen() {
        super(Component.literal("SASTI SMP"));
        this.config = SastiPauseMenuConfig.load();
    }

    @Override
    protected @NotNull OwoUIAdapter<FlowLayout> createAdapter() {
        return OwoUIAdapter.create(this, UIContainers::verticalFlow);
    }

    @Override
    protected void build(FlowLayout root) {
        this.root = root;
        root.alignment(HorizontalAlignment.CENTER, VerticalAlignment.CENTER);
        root.surface((graphics, component) -> {
            int x = component.x();
            int y = component.y();
            int width = component.width();
            int height = component.height();
            graphics.drawGradientRect(x, y, width, height, 0xEF070609, 0xE610080A, 0xEF050507, 0xEF090609);
            graphics.fill(x, y, x + width, y + 2, 0xB8A12B35);
            graphics.fill(x, y + height - 2, x + width, y + height, 0x806B4A22);
        });

        FlowLayout panel = UIContainers.verticalFlow(Sizing.fixed(320), Sizing.content());
        panel.padding(Insets.of(14));
        panel.gap(7);
        panel.surface((graphics, component) -> {
            int x = component.x();
            int y = component.y();
            int width = component.width();
            int height = component.height();
            graphics.drawGradientRect(x, y, width, height, 0xF0180D10, 0xF0120A0D, 0xF009090B, 0xF0120C0E);
            graphics.drawRectOutline(x, y, width, height, 0xFFD7B15B);
            graphics.drawRectOutline(x + 2, y + 2, width - 4, height - 4, 0x704B2323);
        });

        LabelComponent title = UIComponents.label(Component.literal("SASTI SMP"));
        title.color(Color.ofRgb(GOLD));
        title.shadow(true);
        title.horizontalSizing(Sizing.fill(100));
        title.horizontalTextAlignment(HorizontalAlignment.CENTER);
        panel.child(title);

        LabelComponent subtitle = UIComponents.label(Component.literal("COMMUNITY SERVER  •  PAUSE MENU"));
        subtitle.color(Color.ofRgb(MUTED));
        subtitle.horizontalSizing(Sizing.fill(100));
        subtitle.horizontalTextAlignment(HorizontalAlignment.CENTER);
        panel.child(subtitle);

        panel.child(UIComponents.box(Sizing.fill(100), Sizing.fixed(1))
                .fill(true)
                .color(Color.ofArgb(0xBBD7B15B)));

        panel.child(this.button("RESUME GAME", () -> Minecraft.getInstance().gui.setScreen(null)));
        panel.child(this.button("SASTI SMP SERVER", () -> this.showInfo("SERVER INFORMATION", List.of(
                "Server: " + this.config.serverName,
                "Address: " + this.config.serverAddress
        ))));
        panel.child(this.button("DISCORD", () -> this.showInfo("SASTI SMP DISCORD", List.of(
                this.config.discordInvite
        ))));
        panel.child(this.button("SETTINGS", () -> {
            Minecraft minecraft = Minecraft.getInstance();
            minecraft.gui.setScreen(new OptionsScreen(this, minecraft.options));
        }));
        panel.child(this.button("FEEDBACK", () -> this.showInfo("FEEDBACK", List.of(
                this.config.feedbackUrl
        ))));
        panel.child(this.button("QUIT GAME", () -> Minecraft.getInstance().stop()));

        LabelComponent footer = UIComponents.label(Component.literal("A COMMUNITY BUILT TO LAST"));
        footer.color(Color.ofRgb(0x817A75));
        footer.horizontalSizing(Sizing.fill(100));
        footer.horizontalTextAlignment(HorizontalAlignment.CENTER);
        panel.child(footer);

        root.child(panel);
    }

    private ButtonComponent button(String text, Runnable action) {
        ButtonComponent button = UIComponents.button(Component.literal(text), component -> action.run());
        button.renderer(ButtonComponent.Renderer.flat(0xFF281116, 0xFF54151D, 0xFF241B1D));
        button.textShadow(false);
        button.horizontalSizing(Sizing.fill(100));
        return button;
    }

    private void showInfo(String title, List<String> lines) {
        FlowLayout dialog = UIContainers.verticalFlow(Sizing.fixed(280), Sizing.content());
        dialog.padding(Insets.of(12));
        dialog.gap(8);
        dialog.surface((graphics, component) -> {
            int x = component.x();
            int y = component.y();
            int width = component.width();
            int height = component.height();
            graphics.fill(x, y, x + width, y + height, 0xF00B090A);
            graphics.drawRectOutline(x, y, width, height, 0xFFD7B15B);
        });

        LabelComponent heading = UIComponents.label(Component.literal(title));
        heading.color(Color.ofRgb(GOLD));
        heading.shadow(true);
        dialog.child(heading);

        for (String line : lines) {
            LabelComponent detail = UIComponents.label(Component.literal(line));
            detail.color(Color.ofRgb(0xE8E2DC));
            detail.maxWidth(252);
            dialog.child(detail);
        }

        dialog.child(UIComponents.button(Component.literal("CLOSE"), button -> dialog.parent().remove()));
        root.child(UIContainers.overlay(dialog).closeOnClick(false));
    }
}