LawrenceThePlayer

Create a Minecraft plugin called FlyHighSMP - Command for Paper/Spigot (latest version).

The plugin must include:

Per-world commands system: allow or block commands depending on world name, with support for allowlists, blocklists, and wildcard rules.

Command hiding system: hide blocked or unauthorized commands from tab completion and /help so players only see allowed commands.

GeyserMC/Floodgate compatibility: detect Bedrock players and ensure all features work for them, with optional separate config rules for Bedrock vs Java.

Permission system: use permission nodes for all commands and features (example: flyhighsmp.command.fly, flyhighsmp.hide.bypass).

Fully configurable config.yml: all commands, permissions, messages, and world rules must be editable in config.

Command handling logic: when a player runs a command, check permission, world rules, command enabled status, and Bedrock/Java rules, then cancel with a configurable message if not allowed.

Custom messages: configurable messages for no permission, world blocked, and command disabled.

The plugin should be optimized, clean, and follow proper Paper/Spigot API practices

Kodari AI
KodariApr 10 at 12:58 pm 10,450 (v2)

I’ll create a comprehensive command control plugin with per-world rules, Bedrock player detection, and command hiding.

FlyHighSMP
Advanced command control system for Paper/Spigot servers with per-world command restrictions, allowlist/blocklist management, wildcard pattern matching, and GeyserMC/Floodgate Bedrock player detection. Features command hiding from tab completion, permission-based access control, configurable messages, and separate rules for Java and Bedrock players. Supports debug mode and live config reloading.

All files created! The FlyHighSMP plugin includes:

Core Features:

  • Per-world command control (allow/deny modes)

  • Command-specific rules with permission checks

  • Global world rules for multiple commands

  • Wildcard pattern matching (minecraft:, essentials:, etc.)

  • GeyserMC/Floodgate Bedrock player detection

  • Command hiding from tab completion based on restrictions

  • Debug mode for troubleshooting

Architecture:

  • ConfigManager loads all rules and settings

  • CommandManager validates commands with multiple checks

  • FloodgateManager detects Bedrock players

  • MessageManager handles colored messages

  • CommandListener intercepts commands and tab completion

  • Data classes use Lombok for clean code

Permission nodes:

  • flyhighsmp.admin - Access reload command

  • flyhighsmp.hide.bypass - See all commands in tab completion

  • flyhighsmp.command.* - Per-command permissions (configurable)

  • flyhighsmp.wildcard.* - Wildcard pattern permissions

Command validation order: enabled check → permission check → Bedrock check → world rules check → wildcard check. Tab completion automatically filters blocked commands unless player has bypass permission.

LawrenceThePlayer

How to set command

Kodari AI
KodariApr 10 at 1:07 pm 2,804 (v2)

I’ll read the project files to understand how commands are configured in your plugin.

How to Set Commands in FlyHighSMP

Your plugin restricts commands based on world, Bedrock players, and permissions. Here’s how to configure commands in config.yml:

Basic Command Configuration

Add commands under the commands: section:

YAML
commands:
  command-name:
    enabled: true                    # Enable/disable the command
    permission: "your.permission"    # Required permission (empty string "" for none)
    bedrock-allowed: true            # Allow Bedrock players to use it
    worlds:                          # Per-world rules
      world_name:
        mode: "allow"                # "allow" or "deny"

Example: Restrict /tp command

YAML
commands:
  tp:
    enabled: true
    permission: "flyhighsmp.command.tp"
    bedrock-allowed: false           # Bedrock players cannot use
    worlds:
      world:
        mode: "allow"
      lobby:
        mode: "deny"                 # Blocked in lobby world

World-Based Blocking

Block specific commands in an entire world:

YAML
world-rules:
  lobby:
    mode: "deny"
    commands:
      - "fly"
      - "gamemode"
      - "give"

Wildcard Patterns

Block commands by namespace/plugin:

YAML
wildcards:
  - pattern: "worldedit:*"          # Block all WorldEdit commands
    permission: "flyhighsmp.wildcard.worldedit"
    enabled: true

After Making Changes

Run /flyhighsmp reload to apply your configuration without restarting the server.

Permissions:

  • flyhighsmp.admin - Access to /flyhighsmp reload

  • flyhighsmp.hide.bypass - See all commands in tab completion

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
12 702
src/main/java/com/flyhighsmp/FlyHighSMP.java
package com.flyhighsmp;

import com.flyhighsmp.command.MainCommand;
import com.flyhighsmp.listener.CommandListener;
import com.flyhighsmp.manager.CommandManager;
import com.flyhighsmp.manager.ConfigManager;
import com.flyhighsmp.manager.FloodgateManager;
import com.flyhighsmp.manager.MessageManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class FlyHighSMP extends JavaPlugin {
    
    private ConfigManager configManager;
    private FloodgateManager floodgateManager;
    private MessageManager messageManager;
    private CommandManager commandManager;
    
    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.configManager.load();
        
        this.floodgateManager = new FloodgateManager(this);
        this.messageManager = new MessageManager(this);
        this.commandManager = new CommandManager(this);
        
        getServer().getPluginManager().registerEvents(new CommandListener(this), this);
        
        MainCommand mainCommand = new MainCommand(this);
        getCommand("flyhighsmp").setExecutor(mainCommand);
        getCommand("flyhighsmp").setTabCompleter(mainCommand);
        
        getLogger().info("FlyHighSMP has been enabled!");
        if (floodgateManager.isFloodgateEnabled()) {
            getLogger().info("Floodgate detected - Bedrock support enabled!");
        }
    }
    
    @Override
    public void onDisable() {
        getLogger().info("FlyHighSMP has been disabled!");
    }
    
    public void reload() {
        this.configManager.reload();
    }
}