package wtf.expensive.command.impl;
import net.minecraft.scoreboard.ScoreObjective;
import wtf.expensive.command.Command;
import wtf.expensive.command.CommandInfo;
import wtf.expensive.util.ClientUtil;
@CommandInfo(name = "rct", description = "Перезаход на funtime")
public class RctCommand extends Command {
@Override
public void run(String[] args) throws Exception {
String anca = "";
for (ScoreObjective team : mc.world.getScoreboard().getScoreObjectives()) {
String an = team.getDisplayName().getString();
if (an.contains("Анархия-")) {
anca = an.split("Анархия-")[1];
mc.player.sendChatMessage("/hub");
break;
}
}
mc.player.sendChatMessage("/an" + anca);
String finalAnca = anca;
new Thread(() -> {
try {
Thread.sleep(700);
} catch (InterruptedException e) {
e.printStackTrace();
}
mc.player.sendChatMessage("/an" + finalAnca);
}).start();
}
@Override
public void error() {
ClientUtil.sendMesage(".rct");
}
}