proplayeryt2025.

Make a Minecraft plugin called CommandLogger by MrNaruto this plugin logs Minecraft chat , sign event , commands and can be send to a discord webhook showing who send it the message and time and world and cords chat can be sent to a different webhook same with others add more loggings for different things

Kodari AI
KodariJan 26 at 2:14 am 10,333 (v2)

I’ll create a comprehensive command and event logging plugin with Discord webhook integration.

CommandLogger
A powerful logging plugin that tracks and sends various server events to Discord webhooks. Logs player chat messages, commands, sign edits, player joins/quits, deaths, block interactions, and more. Each event type can be configured with separate Discord webhooks, showing detailed information including player name, message/action, timestamp, world, and coordinates. Includes toggle options for each logging category and configurable message formats.

✅ CommandLogger plugin created successfully!

Features included:

  • Chat logging

  • Command logging (with bypass list for sensitive commands like /login)

  • Sign editing logging

  • Player join/quit logging (includes IP address on join)

  • Player death logging

  • Block break/place logging

  • Player damage logging (optional, disabled by default)

  • Item drop/pickup logging (optional, disabled by default)

Each webhook shows:

  • Player name

  • Relevant action/message

  • World name

  • Coordinates

  • Timestamp

Commands:

  • /clogger reload - Reload configuration

  • /clogger status - View enabled/disabled webhooks

  • /clogger toggle <type> - Toggle specific webhook types

Permissions:

  • commandlogger.admin - Access to all commands (OP by default)

  • commandlogger.bypass - Players with this won’t be logged

Setup: Edit config.yml and replace the webhook URLs with your Discord webhook URLs for each event type you want to track!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
13 802
src/main/java/dev/mrnaruto/commandlogger/CommandLogger.java
package dev.mrnaruto.commandlogger;

import dev.mrnaruto.commandlogger.commands.CommandLoggerCommand;
import dev.mrnaruto.commandlogger.listeners.*;
import dev.mrnaruto.commandlogger.utils.DiscordWebhook;
import lombok.Getter;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;

public class CommandLogger extends JavaPlugin {
    
    @Getter
    private static CommandLogger instance;
    
    @Getter
    private DiscordWebhook discordWebhook;
    
    @Override
    public void onEnable() {
        instance = this;
        
        saveDefaultConfig();
        
        discordWebhook = new DiscordWebhook(this);
        
        registerListeners();
        registerCommands();
        
        getLogger().info("CommandLogger has been enabled!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("CommandLogger has been disabled!");
    }
    
    private void registerListeners() {
        PluginManager pm = getServer().getPluginManager();
        
        pm.registerEvents(new ChatListener(this), this);
        pm.registerEvents(new CommandListener(this), this);
        pm.registerEvents(new SignListener(this), this);
        pm.registerEvents(new JoinQuitListener(this), this);
        pm.registerEvents(new DeathListener(this), this);
        pm.registerEvents(new BlockListener(this), this);
        pm.registerEvents(new PlayerListener(this), this);
    }
    
    private void registerCommands() {
        getCommand("commandlogger").setExecutor(new CommandLoggerCommand(this));
    }
    
    public void reloadPluginConfig() {
        reloadConfig();
        discordWebhook = new DiscordWebhook(this);
    }
}