Owen St John

Make me a plugin named ObroCommander. Make the plugin run commands with configerable timers, allow unlimited commands, make it all under ranks that connect to luckperms groups/ranks. so under ranks if i put - vip, i can put the commands, timers for each command, and do anything, affecting just that vip group. make it super easy to config and add more ranks stuff.

Kodari AI
KodariSep 27 at 2:00 am 1
ObroCommander
A Minecraft plugin that executes configured commands on customizable timers, organized under rank sections that map directly to LuckPerms groups. Each rank (e.g., vip) contains its own list of commands with individual intervals, permissions, and optional messages. The configuration uses a simple YAML structure where adding a new rank means creating a new section with its commands and timers. The plugin checks player permissions against LuckPerms groups to determine which rank's commands apply. Supports unlimited commands per rank, configurable delays, random command selection, and per-rank enable/disable toggles. Designed for easy setup with minimal configuration required.
  1. Create the Gradle plugin scaffold and LuckPerms integration.

  2. Add an easy rank → group → repeating commands configuration, with per-command timers and player placeholders.

  3. Document setup and declare the LuckPerms soft dependency.

Created ObroCommander with LuckPerms group-based command timers. Configure ranks under ranks; each rank can have unlimited named commands with its own interval-seconds and initial-delay-seconds. Commands run as console for each online player in that group, including players who inherit it.

The default config includes %player%, %uuid%, and %world% placeholders. Use /obrocommander reload to reload the config. LuckPerms must be installed and enabled.

Owen St John

add a placeholder for every key. If i have a rewards name as eliterare and it gives the elite rank a command, it has a placeholder named %obroscmd_timer_(reward name)% do not change any file formats in config, instead make a new file named messages where you can edit every message. THE PICTURE I SENT IS AN EXAMPLE. For the (reward name), its the pro: and prorare: NOT the ranks it gives it too. Again dont change any formats or anything in config.yml so i can copy and paste the old one into this new version and there will just be a new file. make this placeholder work on TAB scoreboard.

Kodari AI
KodariNov 5 at 12:05 am 1
  1. Add %obroscmd_timer_<config-key>% placeholders tied to the reward keys (such as pro and prorare) without altering config.yml.

  2. Add messages.yml for configurable plugin messages, preserving existing config format.

Added PlaceholderAPI support for TAB scoreboards. Use %obroscmd_timer_pro% or %obroscmd_timer_prorare%—the suffix matches the top-level reward key in config.yml, not the LuckPerms group. It shows the time until the soonest command under that key runs (HH:MM:SS); players outside its group see -.

Added messages.yml for editable plugin messages. /obrocommander reload reloads both message and rank configuration. config.yml was left unchanged, so you can keep your existing format. PlaceholderAPI must be installed for the TAB placeholders to resolve.

Owen St John

make a /timer and a custom placeholder that opens a link to the /timer menu when clicked. make /timer open a COMPLETELY configurable gui with configurable items, messages on items and everywhere, titles, item slots, how many rows. Make the menu have all the commands unlocked with your parent/group you have and every other one is locked. make the main page have your unlocked commands while a items on the bottom right has a second page when you click on it that has all the locked slots. make a Locked slots: items, messages and slots and everything configurable and make a item bottom left that goes back to unlocked with the same configurability. Make it all configurable in a NEW file named menuconfig.yml Make the /timer gui also show how long until it runs the command for you with configurable message.

Kodari AI
KodariNov 5 at 12:25 am 1
  1. Trace command scheduling and PlaceholderAPI support so the timer menu uses the existing reward keys and cooldown data.

  2. Add the configurable /timer GUI, locked/unlocked pages, click-to-open placeholder, and menuconfig.yml without changing config.yml.

Added /timer with configurable unlocked and locked pages, per-command countdowns, configurable titles/items/lore/slots/rows, and pagination for large command lists. The GUI settings and messages are in menuconfig.yml; config.yml remains unchanged, and /obrocommander reload reloads the menu settings too.

/timerlink sends a clickable chat message that opens /timer. A PlaceholderAPI placeholder can only return text, so it can’t provide a click action in a TAB scoreboard; the existing reward timer placeholders remain available as text.

Owen St John

make the menus reload every 1 second, that should make the timer countdown live in /timer.

Kodari AI
KodariNov 5 at 2:39 am 1
  1. Refresh each open /timer inventory once per second in place, so countdown lore updates without closing or reopening the menu.

Open /timer menus now refresh in place every second, updating command countdowns without closing or reopening the GUI.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
10 915
src/main/java/com/obrocommander/ObroCommanderPlugin.java
package com.obrocommander;

import net.luckperms.api.LuckPerms;
import net.luckperms.api.LuckPermsProvider;
import net.kyori.adventure.text.event.ClickEvent;
import net.kyori.adventure.text.event.HoverEvent;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;

import java.io.File;
import java.util.Collections;
import java.util.List;

public final class ObroCommanderPlugin extends JavaPlugin implements CommandExecutor, TabCompleter {
    private RankCommandScheduler rankCommandScheduler;
    private TimerMenuManager timerMenuManager;
    private FileConfiguration messages;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        reloadMessages();

        if (getServer().getPluginManager().getPlugin("LuckPerms") == null
                || !getServer().getPluginManager().isPluginEnabled("LuckPerms")) {
            getLogger().severe(getMessage("startup.luckperms-required"));
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        LuckPerms luckPerms;
        try {
            luckPerms = LuckPermsProvider.get();
        } catch (IllegalStateException exception) {
            getLogger().severe(getMessage("startup.luckperms-api-error"));
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        rankCommandScheduler = new RankCommandScheduler(this, luckPerms);
        rankCommandScheduler.reload();
        timerMenuManager = new TimerMenuManager(this, rankCommandScheduler);
        getServer().getPluginManager().registerEvents(timerMenuManager, this);
        getCommand("obrocommander").setExecutor(this);
        getCommand("obrocommander").setTabCompleter(this);
        getCommand("timer").setExecutor(this);
        getCommand("timerlink").setExecutor(this);

        if (getServer().getPluginManager().isPluginEnabled("PlaceholderAPI")) {
            if (new ObroCommanderExpansion(this, rankCommandScheduler).register()) {
                getLogger().info(getMessage("placeholder.registered"));
            } else {
                getLogger().warning(getMessage("placeholder.registration-failed"));
            }
        } else {
            getLogger().info(getMessage("placeholder.not-installed"));
        }
    }

    @Override
    public void onDisable() {
        if (rankCommandScheduler != null) {
            rankCommandScheduler.stop();
        }
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (command.getName().equalsIgnoreCase("timer")) {
            if (!(sender instanceof Player player)) {
                sender.sendMessage(timerMenuManager.getMessage("messages.player-only", "&cOnly players can open the timer menu."));
                return true;
            }
            timerMenuManager.open(player);
            return true;
        }

        if (command.getName().equalsIgnoreCase("timerlink")) {
            if (!(sender instanceof Player player)) {
                sender.sendMessage(timerMenuManager.getMessage("messages.player-only", "&cOnly players can open the timer menu."));
                return true;
            }
            timerMenuManager.sendClickableLink(player);
            return true;
        }

        if (args.length == 1 && args[0].equalsIgnoreCase("reload")) {
            reloadConfig();
            reloadMessages();
            timerMenuManager.reload();
            rankCommandScheduler.reload();
            sender.sendMessage(getMessage("command.reload-success"));
            return true;
        }

        sender.sendMessage(getMessage("command.usage"));
        return true;
    }

    @Override
    public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
        if (command.getName().equalsIgnoreCase("obrocommander")
                && args.length == 1 && "reload".startsWith(args[0].toLowerCase())) {
            return Collections.singletonList("reload");
        }
        return Collections.emptyList();
    }

    String getMenuText(String path, String fallback) {
        return timerMenuManager.getMessage(path, fallback);
    }

    void sendTimerLink(Player player) {
        String message = timerMenuManager.getMessage("link.message", "&eClick here to open your timers.");
        String hover = timerMenuManager.getMessage("link.hover", "&7Open the timer menu");
        player.sendMessage(LegacyComponentSerializer.legacyAmpersand().deserialize(message)
                .clickEvent(ClickEvent.runCommand("/timer"))
                .hoverEvent(HoverEvent.showText(LegacyComponentSerializer.legacyAmpersand().deserialize(hover))));
    }

    String getMessage(String path, String... replacements) {
        String message = messages.getString(path, "").replace("{prefix}", messages.getString("prefix", ""));
        for (int i = 0; i + 1 < replacements.length; i += 2) {
            message = message.replace(replacements[i], replacements[i + 1]);
        }
        return ChatColor.translateAlternateColorCodes('&', message);
    }

    private void reloadMessages() {
        saveResource("messages.yml", false);
        messages = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "messages.yml"));
    }
}