Šima

make me an rtp gui, home gui, invsee gui, opgive only with console is allowed, hallowen tags, rtpq, item rename and anti flood

Kodari AI
KodariOct 23 at 3:08 pm 1
UtilityCommandCenter
A comprehensive Bukkit plugin providing a suite of utility GUIs and commands. Features a Random Teleport (RTP) GUI with queue system, a Home management GUI for setting and teleporting to saved locations, an Inventory Viewer (Invsee) GUI for inspecting other players' inventories, an OP-only give command restricted to console, Halloween-themed cosmetic tags for players, an item rename command, and an anti-flood system to prevent command spam. All interfaces are built using the custom inventory GUI framework with clickable buttons and lazy initialization.

[Generation stopped]

Šima

and name it shadowcentre and make it proffesionalk

Kodari AI
KodariOct 24 at 9:26 am 1
  1. Set up the professional ShadowCentre Paper plugin project and configuration.

  2. Add RTP/RTP queue, home and Halloween tag GUIs, plus inventory inspection and item renaming.

  3. Restrict /opgive to console and add configurable anti-flood protection.

Created ShadowCentre, a Paper 1.20.4 utility plugin with:

  • /rtp GUI for random teleporting and joining the RTP queue; /rtpq toggles queue membership.

  • /home, /sethome <name>, and /delhome <name> with a clickable homes menu.

  • /invsee <player> to view an online player’s inventory.

  • /tags for Halloween chat tags, saved per player.

  • /rename <name> to rename the item in your hand using & color codes.

  • Configurable chat anti-flood cooldown and duplicate-message blocking.

  • /opgive <player> grants operator status only when run from the server console.

Settings and messages are in src/main/resources/config.yml.

Šima

make it for 1.2111 and add to 2gui to announcement and ban

Kodari AI
KodariOct 24 at 9:31 am 1
  1. Update the project target to Minecraft 1.21.1.

  2. Add administrator GUIs for announcements and bans.

Updated ShadowCentre for Paper 1.21.1 and Java 21. Added two admin GUIs:

  • /announcegui <message> opens a confirmation menu before broadcasting.

  • /bangui [reason] lists online players; selecting one opens a confirmation menu before a permanent name ban.

Both commands are permission-gated (shadowcentre.announce and shadowcentre.ban) and included under shadowcentre.admin. GUI titles, announcement format, and the default ban reason are configurable.

Šima

add to it: /shard /shardshop /shard set /shard give /shard clear

Kodari AI
KodariOct 25 at 6:16 pm 1
  1. Check existing command, menu, and player-data patterns.

  2. Add persistent shard balances with /shard, /shard set, /shard give, and /shard clear.

  3. Add /shardshop with configurable purchasable items and permissions.

Added shard currency with balances saved in profiles.yml:

  • /shard shows your balance.

  • /shard set <player> <amount>, /shard give <player> <amount>, and /shard clear <player> are restricted to admins.

  • /shardshop opens a configurable shop with sample items in config.yml; purchases check the balance and available inventory space.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
10 1,280
src/main/java/com/shadowcentre/ShadowCentrePlugin.java
package com.shadowcentre;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.UUID;
import java.util.regex.Pattern;

public final class ShadowCentrePlugin extends JavaPlugin {
    private static final Pattern HOME_NAME = Pattern.compile("[a-zA-Z0-9_-]{1,16}");

    private PlayerDataManager playerDataManager;
    private RtpManager rtpManager;
    private MenuManager menuManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        playerDataManager = new PlayerDataManager(this);
        rtpManager = new RtpManager(this);
        menuManager = new MenuManager(this, playerDataManager, rtpManager);

        getServer().getPluginManager().registerEvents(menuManager, this);
        getServer().getPluginManager().registerEvents(new AntiFloodListener(this, playerDataManager), this);
        rtpManager.startQueueProcessor();

        for (String command : List.of("rtp", "rtpq", "home", "sethome", "delhome", "invsee", "opgive", "tags", "rename", "announcegui", "bangui", "shard", "shardshop")) {
            if (getCommand(command) != null) {
                getCommand(command).setExecutor(this);
            }
        }
        getLogger().info("ShadowCentre enabled.");
    }

    @Override
    public void onDisable() {
        if (rtpManager != null) {
            rtpManager.stopQueueProcessor();
        }
        if (playerDataManager != null) {
            playerDataManager.save();
        }
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        return switch (command.getName().toLowerCase(Locale.ROOT)) {
            case "rtp" -> handleRtp(sender);
            case "rtpq" -> handleRtpQueue(sender);
            case "home" -> handleHome(sender, args);
            case "sethome" -> handleSetHome(sender, args);
            case "delhome" -> handleDeleteHome(sender, args);
            case "invsee" -> handleInvsee(sender, args);
            case "opgive" -> handleOpGive(sender, args);
            case "tags" -> handleTags(sender);
            case "rename" -> handleRename(sender, args);
            case "announcegui" -> handleAnnouncementGui(sender, args);
            case "bangui" -> handleBanGui(sender, args);
            case "shard" -> handleShard(sender, args);
            case "shardshop" -> handleShardShop(sender);
            default -> false;
        };
    }

    private boolean handleRtp(CommandSender sender) {
        if (!(sender instanceof Player player)) {
            send(sender, "players-only");
            return true;
        }
        menuManager.openRtpMenu(player);
        return true;
    }

    private boolean handleRtpQueue(CommandSender sender) {
        if (!(sender instanceof Player player)) {
            send(sender, "players-only");
            return true;
        }
        if (player.hasPermission("shadowcentre.rtp.bypass")) {
            send(player, "rtp-searching");
            rtpManager.teleportRandom(player);
        } else if (rtpManager.isQueued(player.getUniqueId())) {
            rtpManager.removeFromQueue(player.getUniqueId());
            send(player, "rtp-unqueued");
        } else {
            rtpManager.addToQueue(player);
        }
        return true;
    }

    private boolean handleHome(CommandSender sender, String[] args) {
        if (!(sender instanceof Player player)) {
            send(sender, "players-only");
            return true;
        }
        if (args.length == 0) {
            menuManager.openHomeMenu(player);
            return true;
        }
        playerDataManager.getHome(player.getUniqueId(), args[0]).ifPresentOrElse(location -> {
            player.teleport(location);
            send(player, "teleported-home", "%name%", args[0]);
        }, () -> send(player, "home-missing", "%name%", args[0]));
        return true;
    }

    private boolean handleSetHome(CommandSender sender, String[] args) {
        if (!(sender instanceof Player player)) {
            send(sender, "players-only");
            return true;
        }
        if (args.length != 1) {
            sender.sendMessage(color("&cUsage: /sethome <name>"));
            return true;
        }
        String name = args[0].toLowerCase(Locale.ROOT);
        if (!HOME_NAME.matcher(name).matches()) {
            send(player, "invalid-home-name");
            return true;
        }
        int limit = Math.max(1, getConfig().getInt("homes.max-per-player", 5));
        if (!playerDataManager.hasHome(player.getUniqueId(), name)
                && playerDataManager.getHomes(player.getUniqueId()).size() >= limit) {
            send(player, "home-limit", "%limit%", Integer.toString(limit));
            return true;
        }
        playerDataManager.setHome(player.getUniqueId(), name, player.getLocation());
        send(player, "home-saved", "%name%", name);
        return true;
    }

    private boolean handleDeleteHome(CommandSender sender, String[] args) {
        if (!(sender instanceof Player player)) {
            send(sender, "players-only");
            return true;
        }
        if (args.length != 1) {
            sender.sendMessage(color("&cUsage: /delhome <name>"));
            return true;
        }
        if (playerDataManager.deleteHome(player.getUniqueId(), args[0])) {
            send(player, "home-deleted", "%name%", args[0]);
        } else {
            send(player, "home-missing", "%name%", args[0]);
        }
        return true;
    }

    private boolean handleInvsee(CommandSender sender, String[] args) {
        if (!sender.hasPermission("shadowcentre.invsee") && !sender.hasPermission("shadowcentre.admin")) {
            send(sender, "no-permission");
            return true;
        }
        if (!(sender instanceof Player player)) {
            send(sender, "players-only");
            return true;
        }
        if (args.length != 1) {
            sender.sendMessage(color("&cUsage: /invsee <player>"));
            return true;
        }
        Player target = getServer().getPlayerExact(args[0]);
        if (target == null) {
            send(sender, "invsee-not-found");
            return true;
        }
        player.openInventory(target.getInventory());
        return true;
    }

    private boolean handleOpGive(CommandSender sender, String[] args) {
        if (!(sender instanceof ConsoleCommandSender)) {
            send(sender, "opgive-console-only");
            return true;
        }
        if (args.length != 1) {
            sender.sendMessage(color("&cUsage: /opgive <online-player>"));
            return true;
        }
        Player target = getServer().getPlayerExact(args[0]);
        if (target == null) {
            send(sender, "invsee-not-found");
            return true;
        }
        target.setOp(true);
        send(sender, "opgive-success", "%player%", target.getName());
        send(target, "opgive-notice");
        getLogger().warning("Console granted operator status to " + target.getName() + ".");
        return true;
    }