Build a Friends SMP Minecraft server plugin: configurable custom GUI shop with item prices in $1,000,000–$1,000,000,000, sensible configurable starter items, and integration with SmartSpawners and EssentialsC where their actual APIs can be identified; do not invent APIs or claim unsupported compatibility. Use a standard economy provider integration where possible and document prerequisites and any limitations, especially for spawner purchases. Make player tab header welcome each viewer by their own in-game name, list online players with ping and their economy rank (rank by balance), with safe refresh and configurable formatting. No separate leaderboard. Also forward Minecraft player chat one-way to a Discord bot via async HTTP POST to configurable bridge URL, using JSON {"player":"...","message":"..."} and Authorization: Bearer <token>; no blocking server thread, document configuration. Include commands, permissions and configuration. Implement feature code only.

Kodari AI
KodariNov 14 at 7:59 am 1
FriendsSMPShop
Configurable GUI shop plugin for Friends SMP servers with million-dollar item pricing, starter kit, tab header showing player names with ping and economy rank, and one-way Discord chat bridge via async HTTP POST. Integrates with EssentialsC and SmartSpawners where APIs are identifiable, with standard economy provider fallback. Features configurable shop items, spawner purchases, tab list formatting, and Discord webhook forwarding with Bearer token authentication. Includes commands, permissions, and YAML configuration for all features.
  1. Create the plugin entry point, commands, and Vault economy hookup.

  2. Add a configurable paginated shop and a per-viewer tab display with balance ranks and ping.

  3. Add the asynchronous Discord HTTP bridge and document economy/spawner limits in the default config.

Implemented the FriendsSMP plugin with /friendsmp shop and /friendsmp reload, configurable shop items priced from $1,000,000 to $1,000,000,000, and a per-viewer tab header showing online players, ping, and balance rank.

Vault is required for purchases and economy ranks; an EssentialsC-specific API was not verified, so there is no direct EssentialsC integration. SmartSpawners APIs were also not verified: the shop sells ordinary configured items only, not configured SmartSpawners spawners. These prerequisites and limits are noted in config.yml.

Minecraft chat forwarding is optional and sends the specified JSON with a Bearer token over asynchronous HTTP. Configure its URL and token in config.yml; for the receiving endpoint, build a Discord bot project on Kodari and deploy it there.

p8rziv4l

i also need a bridge token for a discord bot to send the minecraft chat into a text channel

Kodari AI
KodariNov 14 at 8:13 am 1

The plugin already sends discord-bridge.token as Authorization: Bearer <token>. Set enabled: true, your Discord bot’s hosted endpoint in url, and the same long, random shared bridge secret in token and in the bot’s endpoint. The bot should verify that secret, then post the received player and message to the configured text channel.

That shared secret is separate from the Discord bot token—keep the Discord bot token only on the bot side, not in the Minecraft plugin config. You can host the receiving endpoint as a Discord bot project on Kodari at its https://<name>.kodaribots.com URL.

p8rziv4l

make the shop to where i just have to do "/shop"

Kodari AI
KodariNov 14 at 8:26 am 1
  1. Register /shop as a direct command while keeping the existing /friendsmp shop route.

  2. Apply the existing shop permission and player-only behavior to both entry points.

/shop now opens the shop directly, with the existing friendssmp.shop permission. /friendsmp shop remains available too.

p8rziv4l

how do i setup the discord-bridge

Kodari AI
KodariNov 14 at 8:27 am 1

Set up the bridge on both sides with the same shared secret:

  1. Create and deploy a Discord bot project on Kodari. Its HTTP endpoint needs to accept POST requests, verify the Authorization: Bearer <secret> header, read JSON fields player and message, and send them to your chosen Discord text channel. Give the bot permission to view that channel and send messages.

  2. In the plugin’s config.yml, set the endpoint URL and shared secret:

    YAML
    discord-bridge:
      enabled: true
      url: "https://<your-bot-name>.kodaribots.com/<your-post-route>"
      token: "<same-long-random-secret>"
    

    Use the full URL for the bot’s POST route.

  3. Keep the Discord bot token only in the bot project’s secrets/configuration—don’t put it in the Minecraft plugin config. The plugin’s token is just the shared bridge secret.

  4. Save the config, then run /friendsmp reload or restart the server. Send a Minecraft chat message to test it.

p8rziv4l

make me a config yml file for it

Kodari AI
KodariNov 14 at 8:36 am 1
  1. Add a ready-to-fill Discord bridge section to the plugin’s existing config.yml.

  2. Keep forwarding disabled until you replace the example URL and shared secret, then enable it.

Updated src/main/resources/config.yml with a Discord bridge template. Replace the example url with your bot’s full POST endpoint and token with the same random shared secret configured in the bot, then set enabled: true. Keep your actual Discord bot token on the bot side only. Restart the server or run /friendsmp reload to apply it.

p8rziv4l

make it into a folder i can into the plugins folder

Kodari AI
KodariNov 14 at 8:36 am 1

A config folder alone won’t install the plugin—the server needs the compiled plugin JAR. Put the downloaded JAR in your server’s plugins folder and restart; FriendsSMP will create its own folder there with config.yml. Edit that generated config, then run /friendsmp reload or restart again.

To get the JAR, click Compile in Kodari, click Compile in the build window, then Download when it succeeds.

Kodari can make mistakes. Review important code before using.
Files
src
Code
6 871
src/main/java/com/kodari/friendssmp/FriendsSMPPlugin.java
package com.kodari.friendssmp;

import com.kodari.friendssmp.bridge.DiscordBridge;
import com.kodari.friendssmp.shop.ShopService;
import com.kodari.friendssmp.tab.TabListManager;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;

public final class FriendsSMPPlugin extends JavaPlugin {
    private Economy economy;
    private ShopService shopService;
    private TabListManager tabListManager;
    private DiscordBridge discordBridge;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        setupEconomy();

        shopService = new ShopService(this, economy);
        tabListManager = new TabListManager(this, economy);
        discordBridge = new DiscordBridge(this);
        discordBridge.configure();

        Bukkit.getPluginManager().registerEvents(shopService, this);
        Bukkit.getPluginManager().registerEvents(tabListManager, this);
        Bukkit.getPluginManager().registerEvents(discordBridge, this);

        PluginCommand command = getCommand("friendsmp");
        if (command == null) {
            throw new IllegalStateException("The friendsmp command is missing from plugin.yml");
        }
        command.setExecutor(this::handleCommand);

        PluginCommand shopCommand = getCommand("shop");
        if (shopCommand == null) {
            throw new IllegalStateException("The shop command is missing from plugin.yml");
        }
        shopCommand.setExecutor((sender, shop, label, args) -> {
            if (!(sender instanceof Player)) {
                sender.sendMessage(color("&cOnly players can open the shop."));
                return true;
            }
            if (!sender.hasPermission("friendssmp.shop")) {
                sender.sendMessage(color("&cYou do not have permission to use the shop."));
                return true;
            }
            shopService.openShop((Player) sender, 0);
            return true;
        });
        tabListManager.start();
    }

    @Override
    public void onDisable() {
        if (tabListManager != null) {
            tabListManager.stop();
        }
        if (discordBridge != null) {
            discordBridge.shutdown();
        }
    }

    public Economy getEconomy() {
        return economy;
    }

    private void setupEconomy() {
        if (Bukkit.getPluginManager().getPlugin("Vault") == null) {
            getLogger().warning("Vault is not installed; shop purchases and economy ranks are unavailable.");
            return;
        }
        RegisteredServiceProvider<Economy> registration = getServer().getServicesManager().getRegistration(Economy.class);
        if (registration == null || registration.getProvider() == null) {
            getLogger().warning("Vault has no registered economy provider; shop purchases and economy ranks are unavailable.");
            return;
        }
        economy = registration.getProvider();
        getLogger().info("Using Vault economy provider: " + economy.getName());
    }

    private boolean handleCommand(CommandSender sender, Command command, String label, String[] args) {
        if (args.length == 0) {
            sender.sendMessage(color("&bFriendsSMP commands: &f/friendsmp shop &7| &f/friendsmp reload"));
            return true;
        }

        if (args[0].equalsIgnoreCase("shop")) {
            if (!(sender instanceof Player)) {
                sender.sendMessage(color("&cOnly players can open the shop."));
                return true;
            }
            if (!sender.hasPermission("friendssmp.shop")) {
                sender.sendMessage(color("&cYou do not have permission to use the shop."));
                return true;
            }
            shopService.openShop((Player) sender, 0);
            return true;
        }

        if (args[0].equalsIgnoreCase("reload")) {
            if (!sender.hasPermission("friendssmp.reload")) {
                sender.sendMessage(color("&cYou do not have permission to reload this plugin."));
                return true;
            }
            reloadConfig();
            tabListManager.restart();
            discordBridge.configure();
            sender.sendMessage(color("&aFriendsSMP configuration reloaded."));
            return true;
        }

        sender.sendMessage(color("&cUsage: /friendsmp <shop|reload>"));
        return true;
    }

    private String color(String message) {
        return ChatColor.translateAlternateColorCodes('&', message);
    }
}