cihankrparlak20-del

mute and ban komut yap ve şöyle olsun başındaki prefix &c&l| &c'Player' &fmuted &c'player' &ffor &c'time' &ffor &c'Reasone' &c&l| &c'Player' &fBanned &c'player' &ffor &c'time' &ffor &c'Reasone'

Kodari AI
KodariJan 21 at 3:56 pm 8,291 (v2)

I’ll create a moderation plugin with mute and ban commands with the specified message formats.

ModerationSystem
A comprehensive moderation plugin providing ban and mute commands with temporary duration support. Features include customizable punishment messages, automatic expiration handling, and persistent data storage. Administrators can mute players to restrict chat access and ban players from the server with specified reasons and durations. All punishments are logged and managed efficiently with color-coded announcements.

Plugin oluşturuldu! Özellikler:

Komutlar:

  • /mute <oyuncu> <süre> <sebep> - Oyuncuyu susturur

  • /unmute <oyuncu> - Susturma kaldırır

  • /ban <oyuncu> <süre> <sebep> - Oyuncuyu banlar

  • /unban <oyuncu> - Ban kaldırır

Süre formatları:

  • 30s = 30 saniye

  • 5m = 5 dakika

  • 2h = 2 saat

  • 7d = 7 gün

  • perm veya permanent = Kalıcı

Mesaj formatları:

  • Mute: &c&l| &cPlayer &fmuted &ctarget &ffor &ctime &ffor &creason

  • Ban: &c&l| &cPlayer &fBanned &ctarget &ffor &ctime &ffor &creason

Tüm cezalar otomatik kaydedilir ve plugin yeniden başlatıldığında devam eder!

cihankrparlak20-del

If it's an owner, write &c&l| Owner at the beginning; if it's a staff member, write staff; if it's a mod, write mod; if it's a jr.mod, write jr. mod; and for lower ranks, just write Dontor meaning someone who bought something.

Kodari AI
KodariJan 22 at 4:45 am 4,532 (v2)

I’ll add a rank-based prefix system to the chat. Let me first check the existing ChatListener and configuration.

Now I’ll update the ChatListener to add rank-based prefixes and update the config with rank settings:

Done! The chat system now displays rank prefixes based on permissions:

  • moderation.rank.owner → &c&l| Owner

  • moderation.rank.staff → &c&l| Staff

  • moderation.rank.mod → &c&l| Mod

  • moderation.rank.jrmod → &c&l| Jr. Mod

  • Default (no permission) → &c&l| Dontor

The prefixes are fully configurable in config.yml and use a permission hierarchy (checks from highest to lowest rank).

cihankrparlak20-del

donter have ban and mute command

Kodari AI
KodariJan 22 at 4:46 am 5,190 (v2)

I’ll check your command registration and verify the ban/mute commands are properly set up.

Your commands are properly registered in both plugin.yml and ModerationSystem.java. The issue is likely one of these:

Possible causes:

  1. You don’t have the moderation.ban or moderation.mute permission

  2. Plugin didn’t reload properly after changes

  3. Another plugin is overriding these commands

Quick fixes:

  1. Give yourself permission (in console):

    Plain Text
    op YourUsername
    
  2. Or add permissions manually (if using LuckPerms):

    Plain Text
    lp user YourUsername permission set moderation.ban
    lp user YourUsername permission set moderation.mute
    
  3. Restart server (not just reload):

    • Stop server completely

    • Start it again

    • Check console for “ModerationSystem has been enabled!”

  4. Check for conflicts - Type /plugins and see if any other moderation plugins are loaded (LiteBans, AdvancedBan, etc.)

Try these steps and let me know if the commands still don’t work. If they still don’t appear, tell me what happens when you type /ban or /mute in-game.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
15 656
src/main/java/com/moderation/ModerationSystem.java
package com.moderation;

import com.moderation.commands.BanCommand;
import com.moderation.commands.MuteCommand;
import com.moderation.commands.UnbanCommand;
import com.moderation.commands.UnmuteCommand;
import com.moderation.listeners.ChatListener;
import com.moderation.listeners.LoginListener;
import com.moderation.managers.PunishmentManager;
import org.bukkit.plugin.java.JavaPlugin;

public class ModerationSystem extends JavaPlugin {
    private PunishmentManager punishmentManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.punishmentManager = new PunishmentManager(this);
        
        registerCommands();
        registerListeners();
        
        getLogger().info("ModerationSystem has been enabled!");
    }

    @Override
    public void onDisable() {
        if (punishmentManager != null) {
            punishmentManager.savePunishments();
        }
        getLogger().info("ModerationSystem has been disabled!");
    }

    private void registerCommands() {
        getCommand("mute").setExecutor(new MuteCommand(this));
        getCommand("unmute").setExecutor(new UnmuteCommand(this));
        getCommand("ban").setExecutor(new BanCommand(this));
        getCommand("unban").setExecutor(new UnbanCommand(this));
    }

    private void registerListeners() {
        getServer().getPluginManager().registerEvents(new ChatListener(this), this);
        getServer().getPluginManager().registerEvents(new LoginListener(this), this);
    }

    public PunishmentManager getPunishmentManager() {
        return punishmentManager;
    }
}