package dev.crucifixbeta.mod.commands.impl;

import dev.crucifixbeta.core.impl.ConfigManager;
import dev.crucifixbeta.mod.commands.Command;
import java.util.List;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;

@Environment(EnvType.CLIENT)
public class LoadCommand extends Command {

   public LoadCommand() {
      super("load", "[config]");
   }

   @Override
   public void runCommand(String[] parameters) {
      if (parameters.length == 0) {
         this.sendUsage();
      } else {
         this.sendChatMessage("\u00a7fLoading..");
         ConfigManager.loadCfg(parameters[0]);
      }
   }

   @Override
   public String[] getAutocorrect(int count, List<String> seperated) {
      return null;
   }
}
