giniusgamer

64AKMU

📎 1 file 2,400 chars
📄
pasted-code-1778252702597.txt
txt 111 lines
▶
Main Features:

Anti Advertisement System
Detect and block:
Server IPs
Domains
Discord invites
Hidden advertisements using spaces/symbols
IPv4 formats
Common server patterns like:
play.server.com
mc.server.net
server ip formats
Detect even if users bypass using:
spaces
dots
commas
special characters
unicode replacements
Block ALL advertisement attempts in:
chat
commands
private messages
signs
anvils
Allow whitelist domains/IPs configurable in config.yml.
Anti Abuse / Swear Filter
Block abusive language in:
English
Hindi (Indian slang and romanized Hindi abuses)
Include:
severe profanity
bypass attempts
repeated character bypasses
symbol bypasses
Make the blocked words fully configurable in config.yml.
Detect mixed-case bypasses automatically.
Punishment System
For BOTH ads and abusive language:
First 3 violations:
Warning messages only.
After 3 warnings:
Mute for 5 minutes.
Next 3 violations:
Mute for 15 minutes.
Next 3 violations:
Mute for 30 minutes.
Continued violations:
Permanent mute.
Mute System
Muted players cannot:
chat
use msg/tell/w commands
use signs/anvils to bypass
Show mute reason and remaining time.
Store punishments in SQLite.
Punishments must persist after restart.
Staff Commands
/aaunmute 
Removes mute completely.
Only players with permission:
alphaantiads.unmute
/aawarnings 
Shows warning count.
/aareload
Reload config.
Permissions
alphaantiads.bypass
Ignore all checks.
alphaantiads.unmute
alphaantiads.reload
Config Features
config.yml must include:
customizable messages
mute durations
whitelist domains
blocked words
blocked patterns
enable/disable modules
punishment thresholds
Additional Requirements
Use clean OOP structure.
Use listeners and managers properly.
No memory leaks.
Fully asynchronous database operations.
Hex color support.
Detailed console logs.
Lightweight and production-ready.
Generate complete plugin.yml automatically.
Include comments in code for maintainability.
Detection Quality
The anti-ad system should be VERY strict and capable of detecting:
play.alphanetwork.space
alphaserver.net
discord.gg links
numeric IPs
hidden ads like:
p l a y . s e r v e r . n e t
play(dot)server(dot)net
p!a@y.server
Use regex and normalized text comparison.
Output
Generate:
Complete Java source code
plugin.yml
config.yml
package structure
all listeners/managers/utils
no placeholder code
no pseudocode
fully compilable project.
Kodari AI
KodariMay 8 at 3:07 pm 17,514 (v2)

I’ll create a comprehensive anti-advertisement and anti-abuse chat moderation plugin with advanced bypass detection and progressive punishment system.

AlphaAntiAds
A comprehensive chat moderation plugin that detects and blocks advertisements and abusive language with progressive punishment system. Features advanced anti-bypass detection for server IPs, domains, Discord invites, and profanity in multiple languages. Includes SQLite storage, automatic mute escalation, staff management commands, and fully configurable filters with whitelist support.

Complete AlphaAntiAds plugin created with advanced anti-bypass detection!

Features Implemented:

✅ Anti-Advertisement System - Detects IPs, domains, Discord links with aggressive bypass detection (spaces, symbols, leetspeak)
✅ Anti-Abuse Filter - English + Hindi profanity with repeated-char and symbol bypass detection
✅ Progressive Punishments - 3 warnings → 5min → 15min → 30min → permanent mute
✅ Mute System - Blocks chat, commands, signs, anvils
✅ SQLite Storage - Persistent punishments across restarts
✅ Staff Commands - /aaunmute, /aawarnings, /aareload
✅ Hex Color Support - Use &#RRGGBB in messages
✅ Async Database - No server lag
✅ Configurable - Whitelist, blocked words, durations, messages

All code is production-ready with no placeholders.

giniusgamer
📎 1 file 3,229 chars
📄
pasted-code-1778253518836.txt
txt 141 lines
▶
Anti Advertisement System
Detect and block:
Server IPs
Domains
Discord invites
Hidden advertisements using spaces/symbols
IPv4 formats
Common server patterns like:
play.server.com
mc.server.net
server ip formats
Detect even if users bypass using:
spaces
dots
commas
special characters
unicode replacements
Block ALL advertisement attempts in:
chat
commands
private messages
signs
anvils
Allow whitelist domains/IPs configurable in config.yml.
Anti Abuse / Swear Filter
Block abusive language in:
English
Hindi (Indian slang and romanized Hindi abuses)
Include:
severe profanity
bypass attempts
repeated character bypasses
symbol bypasses
Make the blocked words fully configurable in config.yml.
Detect mixed-case bypasses automatically.
Smart Punishment System
For BOTH ads and abusive language:
First 3 violations:
Warning messages only.
After 3 warnings:
Mute for 5 minutes.
Next 3 violations:
Mute for 15 minutes.
Next 3 violations:
Mute for 30 minutes.
Continued violations:
Permanent mute.

IMPORTANT LOGIC:

If a player is already muted:
DO NOT apply another mute.
DO NOT extend current mute automatically.
Simply block the message/command and show:
“You are currently muted.”
While muted:
Player warnings should NOT increase.
Punishment counters should NOT increase.
System must ignore new punishment attempts until mute expires.
After mute expires:
Continue punishment progression normally.
Mute System
Muted players cannot:
chat
use commands except allowed commands
use msg/tell/w/whisper/r commands
use signs/anvils/books to bypass
Add configurable whitelist commands while muted:
example:
/spawn
/hub
/login
Show mute reason and remaining time.
Store punishments in SQLite.
Punishments must persist after restart.
Staff Commands
/aaunmute 
Removes mute completely.
Only players with permission:
alphaantiads.unmute
/aawarnings 
Shows warning count and mute stage.
/aareload
Reload config safely.
Permissions
alphaantiads.bypass
Ignore all checks.
alphaantiads.unmute
alphaantiads.reload
Config Features
config.yml must include:
customizable messages
mute durations
whitelist domains
blocked words
blocked patterns
enable/disable modules
punishment thresholds
allowed commands during mute
Additional Requirements
Use clean OOP structure.
Use listeners and managers properly.
No memory leaks.
Fully asynchronous database operations.
Hex color support.
Detailed console logs.
Lightweight and production-ready.
Generate complete plugin.yml automatically.
Include comments in code for maintainability.
Detection Quality
The anti-ad system should be VERY strict and capable of detecting:
play.alphanetwork.space
alphaserver.net
discord.gg links
numeric IPs
hidden ads like:
p l a y . s e r v e r . n e t
play(dot)server(dot)net
p!a@y.server
Use regex and normalized text comparison.
Command Blocking While Muted
When muted:
Block ALL commands except configurable allowed commands.
Prevent bypass through:
aliases
namespaced commands
plugins
Show:
mute reason
remaining duration
Console and OP players with bypass permission are ignored.
Output
Generate:
Complete Java source code
plugin.yml
config.yml
package structure
all listeners/managers/utils
no placeholder code
no pseudocode
fully compilable project.
Kodari AI
KodariMay 8 at 3:21 pm 32,926 (v2)

I’ll update the AlphaAntiAds plugin with the smart punishment logic and enhanced command blocking system.

Now I’ll update the plugin with smart punishment logic and enhanced command blocking:

Now I’ll register the BookListener in the main class:

Perfect! All updates have been successfully implemented. Here’s what was enhanced:

✅ Smart Punishment System

  • If player is already muted: Violations do NOT increase, no new punishments applied

  • While muted: Warning counters frozen, punishment progression paused

  • After mute expires: Punishment progression continues from last stage

  • Debug logging for muted violation attempts

✅ Enhanced Command Blocking

  • Blocks ALL commands when muted except configurable whitelist

  • Handles bypasses: aliases, namespaced commands (minecraft:tell, essentials:msg)

  • Message commands blocked: /msg, /tell, /w, /whisper, /r, /reply

  • Allowed commands configurable in config.yml:

    • /spawn, /hub, /lobby, /login, /register, /captcha

    • Staff can customize list for server needs

✅ Complete Bypass Prevention

  • Signs: Blocked when muted ✅

  • Anvils: Blocked when muted ✅

  • Books: New listener added ✅

  • Commands: All blocked except whitelist ✅

✅ Enhanced Staff Commands

  • /aawarnings <player> now shows:

    • Violation counts (ads + abuse)

    • Current mute status with time remaining

    • Punishment stage (Warning/Mute 1/2/3/Permanent)

📝 Config Updates

Added allowed-commands-when-muted list with smart defaults and clear documentation explaining the smart punishment logic.

All code is production-ready with proper debug logging and zero placeholder code.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
20 1,542
src/main/java/com/alphaantiads/AlphaAntiAds.java
package com.alphaantiads;

import com.alphaantiads.commands.ReloadCommand;
import com.alphaantiads.commands.UnmuteCommand;
import com.alphaantiads.commands.WarningsCommand;
import com.alphaantiads.config.ConfigManager;
import com.alphaantiads.data.DatabaseManager;
import com.alphaantiads.detection.AdvertisementDetector;
import com.alphaantiads.detection.SwearDetector;
import com.alphaantiads.listeners.AnvilListener;
import com.alphaantiads.listeners.ChatListener;
import com.alphaantiads.listeners.CommandListener;
import com.alphaantiads.listeners.SignListener;
import com.alphaantiads.listeners.BookListener;
import com.alphaantiads.punishment.PunishmentManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class AlphaAntiAds extends JavaPlugin {
    
    private ConfigManager configManager;
    private DatabaseManager databaseManager;
    private PunishmentManager punishmentManager;
    private AdvertisementDetector advertisementDetector;
    private SwearDetector swearDetector;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.databaseManager = new DatabaseManager(this);
        this.databaseManager.initialize();
        
        this.punishmentManager = new PunishmentManager(this);
        this.advertisementDetector = new AdvertisementDetector(this);
        this.swearDetector = new SwearDetector(this);
        
        registerListeners();
        registerCommands();
        
        getLogger().info("AlphaAntiAds has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (databaseManager != null) {
            databaseManager.close();
        }
        getLogger().info("AlphaAntiAds has been disabled!");
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new ChatListener(this), this);
        Bukkit.getPluginManager().registerEvents(new CommandListener(this), this);
        Bukkit.getPluginManager().registerEvents(new SignListener(this), this);
        Bukkit.getPluginManager().registerEvents(new AnvilListener(this), this);
        Bukkit.getPluginManager().registerEvents(new BookListener(this), this);
    }
    
    private void registerCommands() {
        getCommand("aaunmute").setExecutor(new UnmuteCommand(this));
        getCommand("aawarnings").setExecutor(new WarningsCommand(this));
        getCommand("aareload").setExecutor(new ReloadCommand(this));
    }
    
    public ConfigManager getConfigManager() {
        return configManager;
    }
    
    public DatabaseManager getDatabaseManager() {
        return databaseManager;
    }
    
    public PunishmentManager getPunishmentManager() {
        return punishmentManager;
    }
    
    public AdvertisementDetector getAdvertisementDetector() {
        return advertisementDetector;
    }
    
    public SwearDetector getSwearDetector() {
        return swearDetector;
    }
}