czaszulex837-ux

Make a plugin that completely blocks access to the /seed command.

Kodari AI
KodariMar 31 at 11:27 pm 4,774 (v2)

I’ll create a plugin that blocks the /seed command from being executed.

SeedBlocker
A lightweight plugin that prevents players from accessing the /seed command to view the world seed. Features permission-based bypass and a customizable denial message. Perfect for servers that want to keep their world seed private from players.

Plugin created! This will completely block access to the /seed command for players without the seedblocker.bypass permission (ops by default). The denial message is customizable in config.yml and supports color codes.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
6 95
src/main/java/com/seedblocker/SeedBlocker.java
package com.seedblocker;

import com.seedblocker.listener.CommandListener;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class SeedBlocker extends JavaPlugin {

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        getServer().getPluginManager().registerEvents(new CommandListener(this), this);
        
        getLogger().info("SeedBlocker has been enabled!");
    }

    @Override
    public void onDisable() {
        getLogger().info("SeedBlocker has been disabled!");
    }
}