Welcome on MasterOf13FPS! MasterOf13FPS

Register today or sign up if you are already a member and never miss any cool content again :)

Source Bind Command

dirt

Professional Retard
Staff member
Administrator
Moderator
Developer
Joined
Jul 9, 2020
Messages
188
Reaction score
52
Points
28
Website
masterof13fps.com
Dies ist ein simpler Bind-Command.
Den Grundaufbau eines Befehls müsst Ihr selber coden!
Voraussetzungen: ModuleManager

Code:
public Module getModByName(String name) {
    for (Module mod : modules) {
        if ((mod.getName().trim().equalsIgnoreCase(name.trim()))
                || (mod.toString().trim().equalsIgnoreCase(name.trim()))) {
            return mod;
        }
    }

    return null;
}

Dies ist der zentrale Ort, wo Ihr den Syntax abändern könnt.
Wichtig: Es betrifft nur die Ausgabe im Chat, nicht, wie der Befehl wirklich ausgeführt wird!
Code:
String syntax = ".bind <module> <key> | .bind list | .bind clear";

Dies am besten erst überprüfen lassen, wenn der CMD-Syntax korrekt ist, sonst gibt es bei manchen Lags.
Code:
if (Client.getInstance().getModuleManager().getModByName(args[0]) != null) {

Code:
Module mod = moduleManager.getModByName(args[0]);
if (mod == null) {
    Notify.chatMessage("Module " + args[0] + " nicht gefunden.");
    return;
}

int bind = Keyboard.getKeyIndex(args[1]);

if (bind == 0) {
    Notify.chatMessage("Key " + args[1] + " nicht gefunden.");
    return;
}

mod.setBind(bind);
moduleManager.saveBinds();
Notify.chatMessage("Module " + args[0] + " wurde auf " + args[1] + " gebunden.");
Wrapper.mc.thePlayer.playSound("random.anvil_use", 1f, 1f);
Code:
Notify.chatMessage("Alle Keybinds (Format: MOD : KEY):");
for (Module mod : Client.getInstance().getModuleManager().getModules()) {
    if (!(mod.getBind() == 0)) {
        Notify.chatMessage(mod.getName() + " : " + Keyboard.getKeyName(mod.getBind()));
    }
}
Code:
for (Module mod : Client.getInstance().getModuleManager().getModules()) {
    mod.setBind(0);
}
Notify.chatMessage("Es wurden alle Keybinds gelöscht.");
 
Streams sind in Java mittlerweile auch ein ding
 
I have a even simpler bind command system which is like 3-4 lines maximum and works very well, but yours is also good.
 
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top