1
0
mirror of https://github.com/kami-blue/client synced 2025-02-03 22:11:49 +00:00

fixed autoqueuemain

This commit is contained in:
Bella 2019-11-23 22:16:27 -05:00
parent 430cc5aa4d
commit 1e6fc5e382

View File

@ -3,25 +3,37 @@ package me.zeroeightsix.kami.module.modules.misc;
import me.zeroeightsix.kami.module.Module;
import me.zeroeightsix.kami.module.ModuleManager;
import me.zeroeightsix.kami.command.Command;
import me.zeroeightsix.kami.setting.Setting;
import me.zeroeightsix.kami.setting.Settings;
import net.minecraft.client.Minecraft;
import net.minecraft.network.play.client.CPacketChatMessage;
/**
* Created by d1gress/Qther on 24/11/2019.
* Updated by @S-B99 on 24/11/2019
*/
@Module.Info(name = "AutoQMain", description = "Automatically does \"/queue main\" every 7.1 minutes.", category = Module.Category.MISC)
public class AutoQMain extends Module {
private Setting<Boolean> debug = register(Settings.b("Debug", true));
private static long startTime = 0;
@Override
public void onUpdate() {
if (mc.player == null) {
return;
}
if (Minecraft.getMinecraft().getCurrentServerData() == null || (Minecraft.getMinecraft().getCurrentServerData() !=null && !Minecraft.getMinecraft().getCurrentServerData().serverIP.equalsIgnoreCase("2b2t.org"))) {
Command.sendChatMessage("Not on 2b2t");
Command.sendChatMessage("Not connected to 2b2t.org");
ModuleManager.getModuleByName("AutoQMain").disable();
} else {
}
else {
if (startTime == 0) startTime = System.currentTimeMillis();
if (startTime + 426000 >= System.currentTimeMillis()) {
if (startTime + 426000 <= System.currentTimeMillis()) { //426000
if (debug.getValue()) {
Command.sendChatMessage("&7Run &b/queue main&7 at " + System.currentTimeMillis());
}
Minecraft.getMinecraft().playerController.connection.sendPacket(new CPacketChatMessage("/queue main"));
startTime = System.currentTimeMillis();
}