refactor utils category as it's tiny and unnecessary

This commit is contained in:
Bella 2020-04-06 12:39:31 -04:00
parent 0ff218b5cc
commit 88e9f7725e
No known key found for this signature in database
GPG Key ID: 815562EA23BFE344
7 changed files with 8 additions and 18 deletions

View File

@ -72,10 +72,6 @@ public class ActiveModulesCommand extends Command {
am.misc.setValue(args[0] + "," + args[1] + "," + args[2]);
Command.sendChatMessage("Set " + am.misc.getName() + " colour to " + args[0] + " " + args[1] + " " + args[2]);
return;
case "utils":
am.utils.setValue(args[0] + "," + args[1] + "," + args[2]);
Command.sendChatMessage("Set " + am.utils.getName() + " colour to " + args[0] + " " + args[1] + " " + args[2]);
return;
default:
Command.sendErrorMessage("Category '" + args[3] + "' not found! Valid categories: \n" + Arrays.toString(Arrays.stream(Module.Category.values()).filter(Module.Category::isHidden).toArray()));
}

View File

@ -30,7 +30,7 @@ public class GenerateWebsiteCommand extends Command {
@Override
public void call(String[] args) {
List<Module> mods = MODULE_MANAGER.getModules().stream().filter(Module::isProduction).collect(Collectors.toList());
String[] modCategories = new String[]{"Chat", "Combat", "Client", "Misc", "Movement", "Player", "Render", "Utils"};
String[] modCategories = new String[]{"Chat", "Combat", "Client", "Misc", "Movement", "Player", "Render"};
List<String> modCategoriesList = new ArrayList<>(java.util.Arrays.asList(modCategories));
List<String> modsChat = new ArrayList<>();
@ -40,7 +40,6 @@ public class GenerateWebsiteCommand extends Command {
List<String> modsMovement = new ArrayList<>();
List<String> modsPlayer = new ArrayList<>();
List<String> modsRender = new ArrayList<>();
List<String> modsUtils = new ArrayList<>();
mods.forEach(module -> {
switch (module.getCategory()) {
@ -58,8 +57,6 @@ public class GenerateWebsiteCommand extends Command {
modsPlayer.add(nameAndDescription(module));
case RENDER:
modsRender.add(nameAndDescription(module));
case UTILS:
modsUtils.add(nameAndDescription(module));
}
});

View File

@ -95,8 +95,7 @@ public class Module {
MISC("Misc", false),
MOVEMENT("Movement", false),
PLAYER("Player", false),
RENDER("Render", false),
UTILS("Utils", false);
RENDER("Render", false);
boolean hidden;
String name;

View File

@ -41,7 +41,6 @@ public class ActiveModules extends Module {
public Setting<String> player = register(Settings.s("Player", "255,137,102"));
public Setting<String> movement = register(Settings.s("Movement", "111,60,145"));
public Setting<String> misc = register(Settings.s("Misc", "165,102,139"));
public Setting<String> utils = register(Settings.s("Utils", "242,215,238"));
private static int getRgb(String input, int arrayPos) {
String[] toConvert = input.split(",");
@ -96,7 +95,6 @@ public class ActiveModules extends Module {
case PLAYER: return rgbToInt(getRgb(player.getValue(), 0), getRgb(player.getValue(), 1), getRgb(player.getValue(), 2));
case MOVEMENT: return rgbToInt(getRgb(movement.getValue(), 0), getRgb(movement.getValue(), 1), getRgb(movement.getValue(), 2));
case MISC: return rgbToInt(getRgb(misc.getValue(), 0), getRgb(misc.getValue(), 1), getRgb(misc.getValue(), 2));
case UTILS: return rgbToInt(getRgb(utils.getValue(), 0), getRgb(utils.getValue(), 1), getRgb(utils.getValue(), 2));
default: return rgbToInt(1, 1, 1);
}
}

View File

@ -1,4 +1,4 @@
package me.zeroeightsix.kami.module.modules.utils;
package me.zeroeightsix.kami.module.modules.misc;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listener;
@ -20,7 +20,7 @@ import java.util.Objects;
*
* TODO: Fix delay timer because that shit broken
*/
@Module.Info(name = "BlockData", category = Module.Category.UTILS, description = "Right click blocks to display their data")
@Module.Info(name = "BlockData", category = Module.Category.MISC, description = "Right click blocks to display their data")
public class BlockData extends Module {
private int delay = 0;

View File

@ -1,4 +1,4 @@
package me.zeroeightsix.kami.module.modules.utils;
package me.zeroeightsix.kami.module.modules.misc;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listener;
@ -18,7 +18,7 @@ import org.lwjgl.input.Mouse;
*
* TODO: Fix delay timer because that shit broken
*/
@Module.Info(name = "EntityTools", category = Module.Category.UTILS, description = "Right click entities to perform actions on them")
@Module.Info(name = "EntityTools", category = Module.Category.MISC, description = "Right click entities to perform actions on them")
public class EntityTools extends Module {
private Setting<Mode> mode = register(Settings.e("Mode", Mode.DELETE));
private int delay = 0;

View File

@ -1,4 +1,4 @@
package me.zeroeightsix.kami.module.modules.utils;
package me.zeroeightsix.kami.module.modules.player;
import me.zero.alpine.listener.EventHandler;
import me.zero.alpine.listener.Listener;
@ -15,7 +15,7 @@ import static me.zeroeightsix.kami.util.InfoCalculator.round;
* @author S-B99
* Thanks Brady and cooker and leij for helping me not be completely retarded
*/
@Module.Info(name = "ServerNotRespond", description = "Displays a warning when the server is lagging", category = Module.Category.UTILS)
@Module.Info(name = "ServerNotRespond", description = "Displays a warning when the server is lagging", category = Module.Category.PLAYER)
public class ServerNotRespond extends Module {
private Setting<Double> timeout = register(Settings.doubleBuilder().withName("Timeout").withValue(1.0).withMinimum(0.0).withMaximum(10.0).build());
private long serverLastUpdated;