D

Make a plugin called CivitiasM this plugin should have the commands like this with /civitias mute (any duration) /civitias ban (player) any duration and should try to stop common slurs like fuck nigger nigga nga nickker bitch u know basically just slur words

Kodari AI
KodariMar 26 at 4:29 pm 14,098 (v2)

Let me plan this plugin:

  • Main plugin class with managers

  • ChatFilter for slurs/profanity

  • MuteManager and BanManager for moderation

  • Commands: /civitias mute <player> <duration> and /civitias ban <player> <duration>

  • Duration parsing (e.g. 1h, 30m, 7d)

  • Persistent storage (files)

CivitiasM
A moderation plugin featuring mute and ban commands with flexible duration parsing (e.g. 1h, 30m, 7d). Includes an automatic chat filter that detects and blocks common slurs and profanity in player messages. Punishments are stored persistently and enforced on login. Staff are notified of all moderation actions and filter triggers via broadcast messages.

Here’s a summary of everything built:

  • CivitiasM.java — Main plugin class wiring all managers and listeners

  • ConfigManager.java — Centralized config/message helper with color support

  • MuteData / BanData — Lombok-annotated data classes with expiry logic

  • MuteManager / BanManager — Persistent YAML-backed punishment storage, auto-cleans expired entries on load

  • FilterManager — 50+ regex patterns covering leet-speak variants of slurs/profanity (n1gg4, f@g, b1tch, etc.) with leet normalization

  • ChatListener — Blocks muted players from chatting (shows time remaining), cancels filtered messages and notifies staff

  • LoginListener — Kicks banned players on login with reason/expiry screen, clears expired mutes on join

  • CivitiasCommand — Handles /civitias mute <player> <duration> [reason], /civitias ban <player> <duration> [reason], /civitias unmute, /civitias unban with duration formats like 30m, 2h, 7d, perm

D

also add /civitias kick and some more features like /civitas stop server and

Kodari AI
KodariMar 26 at 4:31 pm 9,417 (v2)

Let me read the existing files first.

  • Adding kick, stop, warn, and broadcast subcommands to CivitiasCommand

  • Adding new messages to config.yml and updating plugin.yml usage/permissions

  • No new manager classes needed — these are self-contained operations

Four new subcommands added:

  • /civitias kick <player> [reason] — kicks an online player with a formatted screen and staff notification (civitias.kick)

  • /civitias warn <player> <reason> — sends a warning message directly to the player and notifies staff (civitias.warn)

  • /civitias broadcast <message> — broadcasts a formatted message to all players (civitias.broadcast)

  • /civitias stop — broadcasts a shutdown warning and gracefully shuts down the server after 3 seconds (civitias.stop)

D

can u add a unban command and make the commands shorter like /civ and also can u make it broadcast in a nice Brown like text in chat as well (plugin has to be 1.21.8 by the way) kinda like the screenshot dont make it as big as screenshot make it like normal chat based and add a /civ INVENTORY GUI that allows me to disable and enable commands and also allows me to see banned players that i can unban from INVENTORY GUI

1 image attached
Kodari AI
KodariMar 26 at 4:59 pm 27,463 (v2)

Let me read all existing files first.

  • Add /civ alias, GUI framework, AdminPanelGUI with toggle+bans, brown broadcast, unban from GUI, 1.21 API version

  • Need to add getBans() to BanManager, create CommandToggleManager, full GUI stack, update command handler

  • Broadcast style: 3-line warm orange/brown with ━ separator lines

Here’s a summary of everything added:

  • /civ alias — /civ and /civitias both work now, registered as a aliases: [civ] in plugin.yml

  • Broadcast style — 3-line warm orange/brown with bold ━ separator bars above and below the message (&6&m&l━━━━...)

  • /civ gui — Opens a 54-slot admin panel (requires civitias.admin):

    • Row 1 (slots 0–7): Toggle buttons for mute/unmute/ban/unban/kick/warn/broadcast/stop — click to enable/disable, shows green/red status in lore

    • Rows 2 separator: Gray glass pane divider

    • Rows 3–6 (27 slots): Banned players as skull items showing reason, staff, and remaining time — click any skull to instantly unban them; GUI auto-refreshes after unban

    • Pagination arrows on slots 45 and 53 for large ban lists

  • Disabled command check — All commands check CommandToggleManager first and send &cThe /ban command is currently disabled. if toggled off

  • 1.21 API — Updated api-version: 1.21 and Spigot API to 1.21.1-R0.1-SNAPSHOT with Java 21 target

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
21 1,564
src/main/java/com/civitias/CivitiasM.java
package com.civitias;

import com.civitias.commands.CivitiasCommand;
import com.civitias.inventory.gui.GUIListener;
import com.civitias.inventory.gui.GUIManager;
import com.civitias.listeners.ChatListener;
import com.civitias.listeners.LoginListener;
import com.civitias.managers.BanManager;
import com.civitias.managers.CommandToggleManager;
import com.civitias.managers.FilterManager;
import com.civitias.managers.MuteManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

public class CivitiasM extends JavaPlugin {

    @Getter
    private static CivitiasM instance;

    @Getter
    private MuteManager muteManager;

    @Getter
    private BanManager banManager;

    @Getter
    private FilterManager filterManager;

    @Getter
    private ConfigManager configManager;

    @Getter
    private GUIManager guiManager;

    @Getter
    private CommandToggleManager commandToggleManager;

    @Override
    public void onEnable() {
        instance = this;
        saveDefaultConfig();

        this.configManager = new ConfigManager(this);
        this.muteManager = new MuteManager(this);
        this.banManager = new BanManager(this);
        this.filterManager = new FilterManager(this);
        this.guiManager = new GUIManager();
        this.commandToggleManager = new CommandToggleManager();

        muteManager.loadData();
        banManager.loadData();

        CivitiasCommand executor = new CivitiasCommand(this);
        getCommand("civitias").setExecutor(executor);
        getCommand("civ").setExecutor(executor);
        getServer().getPluginManager().registerEvents(new ChatListener(this), this);
        getServer().getPluginManager().registerEvents(new LoginListener(this), this);
        getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);

        getLogger().info("CivitiasM enabled successfully.");
    }

    @Override
    public void onDisable() {
        if (muteManager != null) muteManager.saveData();
        if (banManager != null) banManager.saveData();
        getLogger().info("CivitiasM disabled.");
    }
}