package dev.crucifixbeta.mod.commands.impl;

import dev.crucifixbeta.CrucifixBeta;
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 ReloadCommand extends Command {

   public ReloadCommand() {
      super("reload", "");
   }

   @Override
   public void runCommand(String[] parameters) {
      this.sendChatMessage("\u00a7fReloading..");
      CrucifixBeta.CONFIG = new ConfigManager();
      CrucifixBeta.CONFIG.load();
      CrucifixBeta.CLEANER.read();
      CrucifixBeta.XRAY.read();
      CrucifixBeta.TRADE.read();
      CrucifixBeta.FRIEND.read();
   }

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