hude67ontop
📎 1 file 1,974 chars
📄
pasted-code-1773323079601.txt
txt 68 lines
▶
UltimateModeration

UltimateModeration is an advanced moderation plugin that automatically detects and punishes inappropriate text entered by players through Anvil GUIs and Signs.

The plugin monitors player input in real time and instantly executes configurable console commands when blocked words are detected. This helps server administrators prevent abuse such as offensive item names or inappropriate sign messages.

Features
Real-Time Text Moderation

Detects blocked words typed in Anvil rename GUIs.

Detects inappropriate text written on Signs.

Prevents items from being renamed if the text contains blocked words.

Actions are triggered instantly when a violation occurs.

Automatic Punishments

Executes configurable console commands when blocked words are detected.

Example: automatically ban a player if they attempt to use inappropriate text.

Verbose Moderation Alerts

Use the command:

/ultimatemod verbose

When enabled, moderators will receive live alerts in chat whenever a player attempts to use blocked words.

Example alert:

[12:43] %player% wrote blocked content in Anvil INVENTORY GUI
[12:44] %player% wrote blocked content on a Sign
Moderation Log Checking

Command:

/ultimatemod check 

This allows moderators to review what a player attempted to write, helping staff verify violations and prevent false bans.

SQLite Punishment Storage

All punishments and logs are saved in a SQLite (.db) database, allowing staff to keep track of moderation actions.

Fully Configurable

Configure blocked words

Configure commands executed on detection

Edit all messages in config.yml

Supports config reload

Commands
/ultimatemod check    - View what a player attempted to write
/ultimatemod reload          - Reload the plugin configuration
/ultimatemod verbose         - Toggle live moderation alerts in chat
Additional Features

Tab completion for /ultimatemod commands

Lightweight and optimized

Fully configurable moderation system
Kodari AI
KodariMar 12 at 1:46 pm 13,694 (v2)

I’ll create UltimateModeration, a real-time text moderation plugin with Anvil/Sign monitoring, auto-punishment, verbose alerts, and SQLite logging.

UltimateModeration
Advanced moderation plugin that automatically detects and punishes inappropriate text entered by players through Anvil GUIs and Signs. Features real-time monitoring, configurable word filtering, automatic console command execution, verbose moderator alerts, punishment logging with SQLite storage, and comprehensive admin tools including violation history checking and live moderation mode.

UltimateModeration plugin created with complete real-time text monitoring, auto-punishment system, verbose alerts, SQLite logging, and admin commands with tab completion.

hude67ontop

Add a punishment tier system to the plugin configuration.

Create three punishment levels in config.yml:

Light_Punishments Medium_Punishments Hard_Punishments

Each level must contain:

a list of words

a punishment-command that will be executed from the console when a player writes one of those words.

Example structure:

Light_Punishments: words:

  • example1
  • example2

punishment-command: "warn %player% Inappropriate language"

Medium_Punishments: words:

  • example3
  • example4

punishment-command: "mute %player% 1h Inappropriate language"

Hard_Punishments: words:

  • example5
  • example6

punishment-command: "ban %player% Inappropriate language"

Behavior:

When a player writes text in an Anvil INVENTORY GUI or on a Sign, the plugin checks the message against all configured word lists.

If a match is found, the corresponding punishment-command for that tier is executed.

%player% should automatically be replaced with the player's name.

The message should also be logged and visible in verbose mode if /ultimatemod verbose is enabled.

Kodari AI
KodariMar 12 at 1:59 pm 9,988 (v2)

I’ll read the existing plugin files to understand the current structure before implementing the punishment tier system.

I’ll implement the punishment tier system by updating the configuration and moderation logic.

Punishment tier system implemented with three configurable levels (Light, Medium, Hard) - each tier checks for specific words and executes its own punishment command with full verbose mode logging and tier identification.

hude67ontop

add minimessage support

Kodari AI
KodariMar 12 at 2:43 pm 8,240 (v2)

I’ll add MiniMessage support to your plugin. Let me first read the existing files to understand the current message handling.

I can see your plugin already has partial MiniMessage support, but it needs proper setup. I’ll complete the MiniMessage integration by:

  1. Adding Paper API dependency (required for MiniMessage)

  2. Updating MessageUtil with proper MiniMessage support

  3. Converting config messages to MiniMessage format

  4. Ensuring ConfigManager uses MessageUtil properly

MiniMessage support has been fully integrated with Paper API, updated MessageUtil with proper MiniMessage formatting methods, and converted all config messages to MiniMessage format.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
15 723
src/main/java/com/example/ultimatemoderation/UltimateModeration.java
package com.example.ultimatemoderation;

import com.example.ultimatemoderation.command.UltimateModCommand;
import com.example.ultimatemoderation.listener.AnvilListener;
import com.example.ultimatemoderation.listener.SignListener;
import com.example.ultimatemoderation.manager.ConfigManager;
import com.example.ultimatemoderation.manager.DatabaseManager;
import com.example.ultimatemoderation.manager.ModerationManager;
import com.example.ultimatemoderation.manager.VerboseManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class UltimateModeration extends JavaPlugin {
    private ConfigManager configManager;
    private DatabaseManager databaseManager;
    private ModerationManager moderationManager;
    private VerboseManager verboseManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.databaseManager = new DatabaseManager(this);
        this.verboseManager = new VerboseManager();
        this.moderationManager = new ModerationManager(this);
        
        this.databaseManager.initialize();
        
        getCommand("ultimatemod").setExecutor(new UltimateModCommand(this));
        getCommand("ultimatemod").setTabCompleter(new UltimateModCommand(this));
        
        Bukkit.getPluginManager().registerEvents(new AnvilListener(this), this);
        Bukkit.getPluginManager().registerEvents(new SignListener(this), this);
        
        getLogger().info("UltimateModeration has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (this.databaseManager != null) {
            this.databaseManager.close();
        }
        getLogger().info("UltimateModeration has been disabled!");
    }
}