NoDenyance

create me a spigot 1.12 plugin with the following features:

there is an appealing INVENTORY GUI when an OP does /dashboard. it looks just like a modern webapp! It gives the option to see inventories, ban a player, doesnt matter if they are online or offline, unban a player, doesnt matter if they are online of offline, change gamemodes, and other practical and useful commands. it should NOT be a classing inventory INVENTORY GUI, it should look like a modern web app INVENTORY GUI that is aesthetic.

Kodari AI
KodariMar 25 at 3:46 am 1,137 (v2)
OpDashboard
A modern webapp-style inventory GUI dashboard for operators to efficiently manage players and server administration. Features include viewing player inventories, banning/unbanning players (online or offline), changing gamemodes, and executing other practical commands through an aesthetic, intuitive interface that mimics contemporary web applications.
NoDenyance

make the inventories be able to be interacted by the dashboard user. Add these features to the OpDashboard plugin: 1) Punishment INVENTORY GUI with ban, tempban, mute, kick buttons using anvil input for reasons/durations. 2) Player stats page showing health, food level, ping, and coordinates. 3) Teleport to player button. 4) Freeze player (prevents movement) and vanish player (hides from others) toggles. All as new INVENTORY GUI screens accessible from the existing player selector. Must compile on Java 8 for Spigot 1.12."

Kodari AI
KodariMar 25 at 3:52 am 2,489 (v2)

Added new GUI screens for player management, punishment, and stats, with features for banning, tempbanning, muting, kicking, viewing stats, teleporting, freezing, and vanishing players. All GUIs are accessible via a new โ€œPlayer Managementโ€ button in the main dashboard.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
16 1,202
src/main/java/com/example/opdashboard/OpDashboard.java
package com.example.opdashboard;

import com.example.opdashboard.inventory.gui.GUIListener;
import com.example.opdashboard.inventory.gui.GUIManager;
import com.example.opdashboard.inventory.impl.DashboardGUI;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;

public class OpDashboard extends JavaPlugin implements Listener {
    private GUIManager guiManager;
    private Set<UUID> frozenPlayers = new HashSet<>();
    private Set<UUID> vanishedPlayers = new HashSet<>();
    private Set<UUID> mutedPlayers = new HashSet<>();

    @Override
    public void onEnable() {
        guiManager = new GUIManager();
        GUIListener guiListener = new GUIListener(guiManager);
        getServer().getPluginManager().registerEvents(guiListener, this);
        getServer().getPluginManager().registerEvents(this, this);
    }

    public GUIManager getGUIManager() {
        return guiManager;
    }

    public Set<UUID> getFrozenPlayers() {
        return frozenPlayers;
    }

    public Set<UUID> getVanishedPlayers() {
        return vanishedPlayers;
    }

    public Set<UUID> getMutedPlayers() {
        return mutedPlayers;
    }

    public long parseDuration(String s) {
        try {
            if (s.endsWith("s")) return Long.parseLong(s.substring(0, s.length() - 1)) * 1000;
            if (s.endsWith("m")) return Long.parseLong(s.substring(0, s.length() - 1)) * 60000;
            if (s.endsWith("h")) return Long.parseLong(s.substring(0, s.length() - 1)) * 3600000;
            if (s.endsWith("d")) return Long.parseLong(s.substring(0, s.length() - 1)) * 86400000;
        } catch (NumberFormatException e) {
            return 0;
        }
        return 0;
    }

    @EventHandler
    public void onPlayerMove(PlayerMoveEvent event) {
        if (frozenPlayers.contains(event.getPlayer().getUniqueId())) {
            event.setTo(event.getFrom());
        }
    }

    @EventHandler
    public void onPlayerChat(AsyncPlayerChatEvent event) {
        if (mutedPlayers.contains(event.getPlayer().getUniqueId())) {
            event.setCancelled(true);
            event.getPlayer().sendMessage(ChatColor.RED + "You are muted.");
        }
    }

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        Player joined = event.getPlayer();
        for (UUID vanished : vanishedPlayers) {
            Player vanishedPlayer = getServer().getPlayer(vanished);
            if (vanishedPlayer != null && !joined.isOp()) {
                joined.hidePlayer(vanishedPlayer);
            }
        }
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player)) {
            sender.sendMessage("This command can only be used by players.");
            return true;
        }
        Player player = (Player) sender;
        if (!player.isOp()) {
            player.sendMessage("You must be an operator to use this command.");
            return true;
        }
        DashboardGUI dashboard = new DashboardGUI();
        guiManager.openGUI(dashboard, player);
        return true;
    }
}