mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 07:11:31 +01:00
(fix) quickplay mod
This commit is contained in:
parent
21d1d57f34
commit
84fdf9d5c8
@ -61,7 +61,6 @@ public class EmotesMod extends Mod {
|
|||||||
EmotesMod.sending = true;
|
EmotesMod.sending = true;
|
||||||
(new Thread("EMOTES BIND:" + bind.emoteId) {
|
(new Thread("EMOTES BIND:" + bind.emoteId) {
|
||||||
public void run() {
|
public void run() {
|
||||||
Client.logger.info("bind found");
|
|
||||||
EmoteSocket.get().startEmote(bind.emoteId);
|
EmoteSocket.get().startEmote(bind.emoteId);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(2000L);
|
Thread.sleep(2000L);
|
||||||
@ -71,8 +70,6 @@ public class EmotesMod extends Mod {
|
|||||||
EmotesMod.sending = false;
|
EmotesMod.sending = false;
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
|
||||||
Client.logger.info("bind not found");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -452,11 +452,13 @@ public class ModSettings extends SilentScreen {
|
|||||||
}
|
}
|
||||||
this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode);
|
this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode);
|
||||||
setting.setValString(this.silentInputs.get(inputIndex).getValue());
|
setting.setValString(this.silentInputs.get(inputIndex).getValue());
|
||||||
|
mod.onChangeSettingValue(setting);
|
||||||
inputIndex++;
|
inputIndex++;
|
||||||
}
|
}
|
||||||
if (setting.isKeybind() && !setting.getName().startsWith("Quickplay Mode")) {
|
if (setting.isKeybind() && !setting.getName().startsWith("Quickplay Mode")) {
|
||||||
this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode);
|
this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode);
|
||||||
setting.setKeybind(this.silentInputs.get(inputIndex).getKey());
|
setting.setKeybind(this.silentInputs.get(inputIndex).getKey());
|
||||||
|
mod.onChangeSettingValue(setting);
|
||||||
inputIndex++;
|
inputIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -370,12 +370,14 @@ public class ModSettings extends SilentScreen {
|
|||||||
}
|
}
|
||||||
this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode);
|
this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode);
|
||||||
setting.setValString(this.silentInputs.get(inputIndex).getValue());
|
setting.setValString(this.silentInputs.get(inputIndex).getValue());
|
||||||
|
mod.onChangeSettingValue(setting);
|
||||||
inputIndex++;
|
inputIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setting.isKeybind() && !setting.getName().startsWith("Quickplay Mode")) {
|
if (setting.isKeybind() && !setting.getName().startsWith("Quickplay Mode")) {
|
||||||
this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode);
|
this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode);
|
||||||
setting.setKeybind(this.silentInputs.get(inputIndex).getKey());
|
setting.setKeybind(this.silentInputs.get(inputIndex).getKey());
|
||||||
|
mod.onChangeSettingValue(setting);
|
||||||
inputIndex++;
|
inputIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
|||||||
import net.silentclient.client.gui.theme.Theme;
|
import net.silentclient.client.gui.theme.Theme;
|
||||||
import net.silentclient.client.gui.theme.input.DefaultInputTheme;
|
import net.silentclient.client.gui.theme.input.DefaultInputTheme;
|
||||||
import net.silentclient.client.gui.util.RenderUtil;
|
import net.silentclient.client.gui.util.RenderUtil;
|
||||||
|
import net.silentclient.client.mods.Setting;
|
||||||
import net.silentclient.client.mods.hypixel.QuickPlayMod;
|
import net.silentclient.client.mods.hypixel.QuickPlayMod;
|
||||||
import net.silentclient.client.mods.util.Server;
|
import net.silentclient.client.mods.util.Server;
|
||||||
import net.silentclient.client.utils.MenuBlurUtils;
|
import net.silentclient.client.utils.MenuBlurUtils;
|
||||||
@ -180,7 +181,9 @@ public class QuickplayModeGui extends SilentScreen {
|
|||||||
for(QuickPlayMod.QuickplayCommandType quickplayMode : quickplayMode.modes) {
|
for(QuickPlayMod.QuickplayCommandType quickplayMode : quickplayMode.modes) {
|
||||||
if(silentInputs.get(inputIndex).isFocused()) {
|
if(silentInputs.get(inputIndex).isFocused()) {
|
||||||
this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode);
|
this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode);
|
||||||
Client.getInstance().getSettingsManager().getSettingByClass(QuickPlayMod.class, String.format("Quickplay Mode&%s&%s", Server.isRuHypixel() ? "RuHypixel" : "Hypixel", quickplayMode.command)).setKeybind(this.silentInputs.get(inputIndex).getKey());
|
Setting setting = Client.getInstance().getSettingsManager().getSettingByClass(QuickPlayMod.class, String.format("Quickplay Mode&%s&%s", Server.isRuHypixel() ? "RuHypixel" : "Hypixel", quickplayMode.command));
|
||||||
|
setting.setKeybind(this.silentInputs.get(inputIndex).getKey());
|
||||||
|
Client.getInstance().getModInstances().getModByClass(QuickPlayMod.class).onChangeSettingValue(setting);
|
||||||
if(keyCode == Keyboard.KEY_ESCAPE) {
|
if(keyCode == Keyboard.KEY_ESCAPE) {
|
||||||
neededKeyCheck = false;
|
neededKeyCheck = false;
|
||||||
break;
|
break;
|
||||||
|
@ -35,6 +35,7 @@ public class QuickPlayMod extends Mod {
|
|||||||
this.addKeybindSetting("Open Menu", this, Keyboard.KEY_MINUS);
|
this.addKeybindSetting("Open Menu", this, Keyboard.KEY_MINUS);
|
||||||
initHypixelModes();
|
initHypixelModes();
|
||||||
initRuHypixelModes();
|
initRuHypixelModes();
|
||||||
|
updateHashMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initHypixelModes() {
|
private void initHypixelModes() {
|
||||||
@ -148,6 +149,20 @@ public class QuickPlayMod extends Mod {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEnable() {
|
||||||
|
super.onEnable();
|
||||||
|
updateHashMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDisable() {
|
||||||
|
super.onDisable();
|
||||||
|
updateHashMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class QuickplayModeType {
|
public class QuickplayModeType {
|
||||||
public String name;
|
public String name;
|
||||||
public String icon;
|
public String icon;
|
||||||
|
Loading…
Reference in New Issue
Block a user