package eu.mhsl.minecraft.pixelblocks.commands;

import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

import java.util.List;

public abstract class SubCommand {
    private final String name;
    private final String permission;
    private final String descriptionKey;

    protected SubCommand(@NotNull String name, @NotNull String permission, @NotNull String descriptionKey) {
        this.name = name;
        this.permission = permission;
        this.descriptionKey = descriptionKey;
    }

    public final @NotNull String name() {
        return name;
    }

    public final @NotNull String permission() {
        return permission;
    }

    public final @NotNull String descriptionKey() {
        return descriptionKey;
    }

    public abstract void execute(@NotNull Player player, @NotNull String[] args);

    public @NotNull List<String> tabComplete(@NotNull Player player, @NotNull String[] args) {
        return List.of();
    }
}
