Tech Pat

Create a complete Minecraft plugin for KmartzSMP using Paper 26.3.

Use Java and Gradle. I'm a beginner, so make the plugin easy to build, install, and configure.

  1. "/media" command

Create a "/media" command that opens a polished Minecraft inventory GUI.

Requirements:

  • The GUI should explain how players can qualify for the server's Media rank.
  • Include items with readable names, colored descriptions, and instructions in their lore.
  • Explain the requirements:

- YouTube: Make long term Videos. - TikTok, YouTube Shorts, or Instagram Reels: at least 5-10+ of them posted and many views. - The server IP must be visible throughout the video. - Players must provide proof of their video and analytics. - Media rank lasts 90 days.

  • Make the GUI attractive and easy to understand, with an appropriate close button.
  • Prevent players from taking, moving, or placing items in the GUI.
  • Make the menu work reliably and prevent players from exploiting it.
  • Use configurable messages and menu items where practical.
  1. "/discord" command

Create a "/discord" command that sends a nice, formatted message only visible to the player who executes it.

Requirements:

  • Use a private command response, such as "CommandSender.sendMessage()" for a normal player command, so other players cannot see it.
  • Include a welcoming message inviting players to join the KmartzSMP Discord.
  • Include the Discord invite link, configured in "config.yml".
  • Format the message with Minecraft colors and a clean layout.
  • Make the Discord invite clickable if supported, with hover text explaining that the player can click to join.
  • Do not broadcast the message to the entire server.
  1. Technical requirements
  • Target Paper 26.3, not older Minecraft versions.
  • Use a compatible Java version and Paper API dependency for the actual 26.3 release.
  • Register both commands correctly in "plugin.yml" or the appropriate Paper-supported configuration.
  • Include a configurable "config.yml" containing the Discord invite, GUI title, messages, and media requirements.
  • Use proper permission checks where needed.
  • Do not require Vault, EssentialsX, DiscordSRV, or any other external plugin.
  • Use modern Paper APIs and avoid deprecated APIs wherever possible.
  • Ensure all imports, dependencies, and source files are included.
  • Include a complete project folder structure and every required file.
  • Do not provide pseudocode, placeholders, or incomplete methods.
  • Ensure the code compiles against the actual Paper 26.3 API.
  • Include clear step-by-step instructions for building the JAR and installing it on my Paper server hosted by Bloom.host.
  • Explain how to configure the Discord invite and customize the media GUI.
  • Verify API compatibility and fix compilation errors before presenting the final code.

Keep the implementation lightweight, reliable, and suitable for a mostly vanilla survival server.

Kodari AI
KodariOct 23 at 8:28 pm 3
MediaDiscordGUI
Provides a polished inventory GUI explaining Media rank requirements via the /media command, plus a private /discord command with a clickable invite link. Features configurable messages, items, and Discord link in config.yml. Uses modern Paper 26.3 APIs, prevents GUI item exploitation, and requires no external plugins. Includes permission checks, lazy-initialized GUI framework, and MiniMessage color formatting for attractive, readable menus.
  1. Build the /media GUI with configurable requirements and item-safe event handling.

  2. Add a private, clickable /discord response using the invite from configuration.

  3. Include the Gradle/plugin files and practical Bloom.host build/install/configuration steps.

Created the KmartzSMP plugin with /media and /discord, configurable menu content and messages, and protection against item clicks and drags in the Media menu. The Discord reply is sent only to the command sender and includes a clickable invite.

The project targets Paper API 26.3 build 218. Paper’s version metadata lists Java 25 as the minimum, so set Bloom.host to Paper 26.3 and Java 25 or newer.

Build and install

  1. On desktop, click Compile in Kodari’s top bar; on phone, tap ⋮ → Compile Project.

  2. Click Compile in the window that opens.

  3. When it succeeds, click Download for the build.

  4. In Bloom.host’s file manager, upload the JAR to the server’s plugins/ folder, then restart the server.

Configure it: After the first start, edit plugins/KmartzSMP/config.yml and restart the server. Replace https://discord.gg/your-invite with your real invite. Adjust the requirements under media.requirements, and customize the GUI title, item materials, names, lore, and slots under media.items. The permission nodes kmartzsmp.command.media and kmartzsmp.command.discord are declared and default to allowing all players.

Tech Pat

Added reload and luckperm permissions

Kodari AI
KodariOct 23 at 9:03 pm 1
  1. Add a permission-protected /kmartzsmp reload command to reload configuration.

  2. Set command permissions up for LuckPerms, with clear node names and default access.

Added /kmartzsmp reload. It reloads config.yml and requires kmartzsmp.command.reload, which defaults to operators. /media and /discord keep their existing permission nodes and remain available to everyone by default.

LuckPerms examples:

  • Grant reload to admins: /lp group admin permission set kmartzsmp.command.reload true

  • Grant or revoke a command permission for a group with kmartzsmp.command.media or kmartzsmp.command.discord using the same command.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
11 485
src/main/java/com/kmartzsmp/KmartzSMPPlugin.java
package com.kmartzsmp;

import com.kmartzsmp.command.DiscordCommand;
import com.kmartzsmp.command.MediaCommand;
import com.kmartzsmp.command.ReloadCommand;
import com.kmartzsmp.gui.MediaMenu;
import com.kmartzsmp.gui.MediaMenuListener;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Objects;

public final class KmartzSMPPlugin extends JavaPlugin {
    @Override
    public void onEnable() {
        saveDefaultConfig();

        MediaMenu mediaMenu = new MediaMenu(this);
        getServer().getPluginManager().registerEvents(new MediaMenuListener(), this);

        PluginCommand mediaCommand = Objects.requireNonNull(getCommand("media"), "media command is missing from plugin.yml");
        mediaCommand.setExecutor(new MediaCommand(this, mediaMenu));

        PluginCommand discordCommand = Objects.requireNonNull(getCommand("discord"), "discord command is missing from plugin.yml");
        discordCommand.setExecutor(new DiscordCommand(this));

        PluginCommand kmartzsmpCommand = Objects.requireNonNull(getCommand("kmartzsmp"), "kmartzsmp command is missing from plugin.yml");
        kmartzsmpCommand.setExecutor(new ReloadCommand(this));
    }
}