Update AutoTextMod.java

This commit is contained in:
kirillsaint 2023-10-08 15:05:54 +06:00
parent f386320ef9
commit 44e7cc0463

View File

@ -18,6 +18,7 @@ import net.silentclient.client.gui.theme.Theme;
import net.silentclient.client.mods.CustomFontRenderer;
import net.silentclient.client.mods.Mod;
import net.silentclient.client.mods.ModCategory;
import net.silentclient.client.mods.util.Server;
import net.silentclient.client.utils.MenuBlurUtils;
import net.silentclient.client.utils.MouseCursorHandler;
import net.silentclient.client.utils.NotificationUtils;
@ -37,7 +38,12 @@ public class AutoTextMod extends Mod {
public AutoTextMod() {
super("Auto Text", ModCategory.MODS, "silentclient/icons/mods/autotext.png");
}
@Override
public boolean isForceDisabled() {
return Server.isHypixel();
}
@Override
public MouseCursorHandler.CursorType renderCustomLiteComponent(int x, int y, int width, int height, int mouseX, int mouseY) {
MouseCursorHandler.CursorType cursorType = null;
@ -180,7 +186,7 @@ public class AutoTextMod extends Mod {
@EventTarget
public void onClick(KeyEvent event) {
if(mc.thePlayer != null && mc.theWorld != null && mc.currentScreen == null && !sending) {
if(mc.thePlayer != null && mc.theWorld != null && mc.currentScreen == null && !sending && !isForceDisabled()) {
for(AutoTextCommand command : commands) {
if(command.getKey() == event.getKey()) {
Client.getInstance().getModInstances().getAutoText().sending = true;