package hu.jgj52.pvpcore.Commands;

import hu.jgj52.pvpcore.Main;
import hu.jgj52.pvpcore.Utils.WorldReset;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.List;

public class ResetArenasCommand implements CommandExecutor, TabCompleter {
    private final Main plugin;

    public ResetArenasCommand(Main plugin) {
        this.plugin = plugin;
    }

    @Override
    public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String s, @NotNull String[] args) {
        WorldReset worldReset = new WorldReset(plugin);
        worldReset.recreateArenaWorld();
        plugin.usedArenas = new ArrayList<>();
        return true;
    }

    @Override
    public @Nullable List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String s, @NotNull String[] args) {
        return List.of();
    }
}
