forked from RepoMirrors/kami-blue
close #484 lol
This commit is contained in:
parent
56f7f6905c
commit
d82b529725
|
@ -13,6 +13,7 @@ import java.util.stream.Collectors;
|
|||
|
||||
/**
|
||||
* Created by 086 on 18/11/2017.
|
||||
* Updated by S-B99 on 24/02/20
|
||||
*/
|
||||
public class SetCommand extends Command {
|
||||
|
||||
|
@ -64,8 +65,12 @@ public class SetCommand extends Command {
|
|||
}
|
||||
|
||||
try {
|
||||
setting.setValueFromString(args[2]);
|
||||
Command.sendChatMessage("Set &b" + setting.getName() + "&r to &3" + args[2] + "&r.");
|
||||
String arg2 = args[2];
|
||||
if (setting.getClass().getSimpleName().equals("EnumSetting")) {
|
||||
arg2 = arg2.toUpperCase();
|
||||
}
|
||||
setting.setValueFromString(arg2); /* PLEASE MAKE SURE TO USE PROPER NAMING WHEN USING ENUMS */ /* if you use improper lowercase letters it will *not* work with this command ~S-B99 */
|
||||
Command.sendChatMessage("Set &b" + setting.getName() + "&r to &3" + arg2 + "&r.");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Command.sendChatMessage("Unable to set value! &6" + e.getMessage());
|
||||
|
|
|
@ -21,7 +21,7 @@ public class ChatTimestamp extends Module {
|
|||
private Setting<ColourUtils.ColourCode> firstColour = register(Settings.e("First Colour", ColourUtils.ColourCode.GREY));
|
||||
private Setting<ColourUtils.ColourCode> secondColour = register(Settings.e("Second Colour", ColourUtils.ColourCode.WHITE));
|
||||
private Setting<TimeUtil.TimeType> timeTypeSetting = register(Settings.e("Time Format", TimeUtil.TimeType.HHMM));
|
||||
private Setting<TimeUtil.TimeUnit> timeUnitSetting = register(Settings.e("Time Unit", TimeUtil.TimeUnit.h12));
|
||||
private Setting<TimeUtil.TimeUnit> timeUnitSetting = register(Settings.e("Time Unit", TimeUtil.TimeUnit.H12));
|
||||
private Setting<Boolean> doLocale = register(Settings.b("Show AMPM", true));
|
||||
|
||||
@EventHandler
|
||||
|
|
|
@ -46,7 +46,7 @@ public class Aura extends Module {
|
|||
private int waitCounter;
|
||||
|
||||
private enum SwitchMode {
|
||||
NONE, ALL, Only32k
|
||||
NONE, ALL, ONLY32K
|
||||
}
|
||||
|
||||
private enum HitMode {
|
||||
|
@ -142,7 +142,7 @@ public class Aura extends Module {
|
|||
// We want to skip this if switchTo32k.getValue() is true,
|
||||
// because it only accounts for tools and weapons.
|
||||
// Maybe someone could refactor this later? :3
|
||||
if ((!switchMode.getValue().equals(SwitchMode.Only32k) || switchMode.getValue().equals(SwitchMode.ALL)) && ModuleManager.isModuleEnabled("AutoTool")) {
|
||||
if ((!switchMode.getValue().equals(SwitchMode.ONLY32K) || switchMode.getValue().equals(SwitchMode.ALL)) && ModuleManager.isModuleEnabled("AutoTool")) {
|
||||
AutoTool.equipBestWeapon();
|
||||
}
|
||||
attack(target);
|
||||
|
@ -181,7 +181,7 @@ public class Aura extends Module {
|
|||
NBTTagCompound enchant = enchants.getCompoundTagAt(i);
|
||||
if (enchant.getInteger("id") == 16) {
|
||||
int lvl = enchant.getInteger("lvl");
|
||||
if (switchMode.getValue().equals(SwitchMode.Only32k)) {
|
||||
if (switchMode.getValue().equals(SwitchMode.ONLY32K)) {
|
||||
if (lvl >= 42) { // dia sword against full prot 5 armor is deadly somehere >= 34 sharpness iirc
|
||||
return true;
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ public class Aura extends Module {
|
|||
holding32k = true;
|
||||
}
|
||||
|
||||
if ((switchMode.getValue().equals(SwitchMode.Only32k) || switchMode.getValue().equals(SwitchMode.ALL)) && !holding32k) {
|
||||
if ((switchMode.getValue().equals(SwitchMode.ONLY32K) || switchMode.getValue().equals(SwitchMode.ALL)) && !holding32k) {
|
||||
|
||||
int newSlot = -1;
|
||||
|
||||
|
@ -230,7 +230,7 @@ public class Aura extends Module {
|
|||
|
||||
}
|
||||
|
||||
if (switchMode.getValue().equals(SwitchMode.Only32k) && !holding32k) {
|
||||
if (switchMode.getValue().equals(SwitchMode.ONLY32K) && !holding32k) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,25 +32,25 @@ public class InfoOverlay extends Module {
|
|||
private Setting<Boolean> ping = register(Settings.b("Latency", false));
|
||||
private Setting<Boolean> durability = register(Settings.b("Item Damage", false));
|
||||
private Setting<Boolean> memory = register(Settings.b("Memory Used", false));
|
||||
private Setting<SpeedUnit> speedUnit = register(Settings.enumBuilder(SpeedUnit.class).withName("Speed Unit").withValue(SpeedUnit.KmH).withVisibility(v -> speed.getValue()).build());
|
||||
private Setting<SpeedUnit> speedUnit = register(Settings.enumBuilder(SpeedUnit.class).withName("Speed Unit").withValue(SpeedUnit.KMH).withVisibility(v -> speed.getValue()).build());
|
||||
private Setting<ColourUtils.ColourCode> firstColour = register(Settings.e("First Colour", ColourUtils.ColourCode.WHITE));
|
||||
private Setting<ColourUtils.ColourCode> secondColour = register(Settings.e("Second Colour", ColourUtils.ColourCode.BLUE));
|
||||
private Setting<TimeUtil.TimeType> timeTypeSetting = register(Settings.enumBuilder(TimeUtil.TimeType.class).withName("Time Format").withValue(TimeUtil.TimeType.HHMMSS).withVisibility(v -> time.getValue()).build());
|
||||
private Setting<TimeUtil.TimeUnit> timeUnitSetting = register(Settings.enumBuilder(TimeUtil.TimeUnit.class).withName("Time Unit").withValue(TimeUtil.TimeUnit.h12).withVisibility(v -> time.getValue()).build());
|
||||
private Setting<TimeUtil.TimeUnit> timeUnitSetting = register(Settings.enumBuilder(TimeUtil.TimeUnit.class).withName("Time Unit").withValue(TimeUtil.TimeUnit.H12).withVisibility(v -> time.getValue()).build());
|
||||
private Setting<Boolean> doLocale = register(Settings.booleanBuilder("Time Show AMPM").withValue(true).withVisibility(v -> time.getValue()).build());
|
||||
|
||||
private enum SpeedUnit {
|
||||
MpS, KmH
|
||||
MPS, KMH
|
||||
}
|
||||
|
||||
public boolean useUnitKmH() {
|
||||
return speedUnit.getValue().equals(SpeedUnit.KmH);
|
||||
return speedUnit.getValue().equals(SpeedUnit.KMH);
|
||||
}
|
||||
|
||||
private String unitType(SpeedUnit s) {
|
||||
switch (s) {
|
||||
case MpS: return "m/s";
|
||||
case KmH: return "km/h";
|
||||
case MPS: return "m/s";
|
||||
case KMH: return "km/h";
|
||||
default: return "Invalid unit type (mps or kmh)";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class ChunkFinder extends Module {
|
|||
private Setting<Integer> yOffset = register(Settings.i("Y Offset", 0));
|
||||
private Setting<Boolean> relative = register(Settings.b("Relative", true));
|
||||
private Setting<Boolean> saveNewChunks = register(Settings.b("Save New Chunks", false));
|
||||
private Setting<SaveOption> saveOption = register(Settings.enumBuilder(SaveOption.class).withValue(SaveOption.extraFolder).withName("Save Option").withVisibility(aBoolean -> saveNewChunks.getValue()).build());
|
||||
private Setting<SaveOption> saveOption = register(Settings.enumBuilder(SaveOption.class).withValue(SaveOption.EXTRA_FOLDER).withName("Save Option").withVisibility(aBoolean -> saveNewChunks.getValue()).build());
|
||||
private Setting<Boolean> saveInRegionFolder = register(Settings.booleanBuilder("In Region").withValue(false).withVisibility(aBoolean -> saveNewChunks.getValue()).build());
|
||||
private Setting<Boolean> alsoSaveNormalCoords = register(Settings.booleanBuilder("Save Normal Coords").withValue(false).withVisibility(aBoolean -> saveNewChunks.getValue()).build());
|
||||
private Setting<Boolean> closeFile = register(Settings.booleanBuilder("Close File").withValue(false).withVisibility(aBoolean -> saveNewChunks.getValue()).build());
|
||||
|
@ -227,13 +227,13 @@ public class ChunkFinder extends Module {
|
|||
File rV = Minecraft.getMinecraft().gameDir;
|
||||
String folderName;
|
||||
switch (saveOption.getValue()) {
|
||||
case liteLoaderWdl: // make folder structure like liteLoader
|
||||
case LITE_LOADER_WDL: // make folder structure like liteLoader
|
||||
folderName = mc.getCurrentServerData().serverName;
|
||||
|
||||
rV = new File(rV, "saves");
|
||||
rV = new File(rV, folderName);
|
||||
break;
|
||||
case nhackWdl: // make folder structure like nhack-insdustries
|
||||
case NHACK_WDL: // make folder structure like nhack-insdustries
|
||||
folderName = getNHackInetName();
|
||||
|
||||
rV = new File(rV, "config");
|
||||
|
@ -306,7 +306,7 @@ public class ChunkFinder extends Module {
|
|||
}
|
||||
|
||||
private enum SaveOption {
|
||||
extraFolder, liteLoaderWdl, nhackWdl
|
||||
EXTRA_FOLDER, LITE_LOADER_WDL, NHACK_WDL
|
||||
}
|
||||
|
||||
private class LastSetting {
|
||||
|
|
|
@ -28,8 +28,7 @@ public class ESP extends Module {
|
|||
private Setting<Boolean> mobs = register(Settings.b("Mobs", false));
|
||||
|
||||
public enum ESPMode {
|
||||
RECTANGLE,
|
||||
GLOW
|
||||
RECTANGLE, GLOW
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,7 +22,7 @@ public class TimeUtil {
|
|||
}
|
||||
|
||||
public enum TimeUnit {
|
||||
h24, h12
|
||||
H24, H12
|
||||
}
|
||||
|
||||
private static String formatTimeString(TimeType timeType) {
|
||||
|
@ -36,9 +36,9 @@ public class TimeUtil {
|
|||
public static SimpleDateFormat dateFormatter(TimeUnit timeUnit, TimeType timeType) {
|
||||
SimpleDateFormat formatter;
|
||||
switch (timeUnit) {
|
||||
case h12:
|
||||
case H12:
|
||||
formatter = new SimpleDateFormat("hh" + formatTimeString(timeType), Locale.UK); break;
|
||||
case h24:
|
||||
case H24:
|
||||
formatter = new SimpleDateFormat("HH" + formatTimeString(timeType), Locale.UK); break;
|
||||
default:
|
||||
throw new IllegalStateException("Unexpected value: " + timeUnit);
|
||||
|
@ -49,8 +49,8 @@ public class TimeUtil {
|
|||
public static String getFinalTime(ColourUtils.ColourCode colourCode2, ColourUtils.ColourCode colourCode1, TimeUnit timeUnit, TimeType timeType, Boolean doLocale) {
|
||||
String formatted = ColourUtils.getStringColour(colourCode2) + ":" + ColourUtils.getStringColour(colourCode1);
|
||||
String locale = "";
|
||||
String time = time(TimeUtil.dateFormatter(TimeUnit.h24, TimeType.HH));
|
||||
if (timeUnit == TimeUnit.h12 && doLocale) {
|
||||
String time = time(TimeUtil.dateFormatter(TimeUnit.H24, TimeType.HH));
|
||||
if (timeUnit == TimeUnit.H12 && doLocale) {
|
||||
if ((Integer.parseInt(time)) - 12 >= 0) { // checks if the 24 hour time minus 12 is negative or 0, if it is it's pm
|
||||
locale = "pm";
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue