Call sendMacro when a macro is pressed

This commit is contained in:
Bella 2020-05-04 22:18:17 -04:00
parent 1915abbc27
commit 79bbb4847f
No known key found for this signature in database
GPG Key ID: DBD4A6030080C8B3
1 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import me.zeroeightsix.kami.event.events.DisplaySizeChangedEvent;
import me.zeroeightsix.kami.gui.UIRenderer;
import me.zeroeightsix.kami.gui.kami.KamiGUI;
import me.zeroeightsix.kami.gui.rgui.component.container.use.Frame;
import me.zeroeightsix.kami.module.MacroManager;
import me.zeroeightsix.kami.module.modules.client.CommandConfig;
import me.zeroeightsix.kami.module.modules.render.AntiOverlay;
import me.zeroeightsix.kami.module.modules.render.BossStack;
@ -235,6 +236,7 @@ public class ForgeEventProcessor {
Minecraft.getMinecraft().displayGuiScreen(new GuiChat(Command.getCommandPrefix()));
} else {
MODULE_MANAGER.onBind(Keyboard.getEventKey());
MacroManager.sendMacro(Keyboard.getEventKey());
}
}
@ -248,10 +250,10 @@ public class ForgeEventProcessor {
if (event.getMessage().length() > 1)
KamiMod.getInstance().commandManager.callCommand(event.getMessage().substring(Command.getCommandPrefix().length() - 1));
else
sendChatMessage("Please enter a command.");
sendChatMessage("Please enter a command!");
} catch (Exception e) {
e.printStackTrace();
sendChatMessage("Error occured while running command! (" + e.getMessage() + ")");
sendChatMessage("Error occured while running command! (" + e.getMessage() + "), check the log for info!");
}
event.setMessage("");
}