Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 923 Bytes

File metadata and controls

23 lines (20 loc) · 923 Bytes

Commands

Available on: Bukkit ✅ full (plugin.yml-backed) · Velocity ⚠️ basic literal registration · BungeeCord ⚠️ basic literal registration · Hytale ⚠️ basic literal registration

BlueFoundation.Commands registers command handlers declared in plugin.yml and provides small sender/tab-completion helpers.

BlueFoundation.Commands.register(
        this,
        "arena",
        (sender, command, label, args) -> {
            if (!BlueFoundation.Commands.hasPermission(sender, "blueva.arena", "<red>No permission.")) {
                return true;
            }
            BlueFoundation.Messages.send(sender, "<green>Arena command executed.");
            return true;
        },
        (sender, command, label, args) -> BlueFoundation.Commands.suggest(
                BlueFoundation.Commands.arg(args, 0),
                Arrays.asList("create", "delete", "edit")
        )
);