Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package RevampClient.command.commands;
- import java.io.IOException;
- import org.lwjgl.input.Keyboard;
- import RevampClient.Revamp;
- import RevampClient.Module.Module;
- import RevampClient.command.Command;
- public class Bind extends Command {
- @Override
- public String getAlias() {
- return "bind";
- }
- @Override
- public String getDiscription() {
- return "Ändert den Keybind von einem Module.";
- }
- @Override
- public String getSyntax() {
- return ".bind <Module> <KeyBind>";
- }
- @Override
- public void onCommand(String command, String[] args) throws IOException {
- if(args[0].equalsIgnoreCase("set")) {
- args[2] = args[2].toUpperCase();
- int key = Keyboard.getKeyIndex(args[2]);
- for(Module m : Revamp.getModules()) {
- if(args[1].equalsIgnoreCase(m.name)) {
- m.setKeybind(Keyboard.getKeyIndex(Keyboard.getKeyName(key)));
- Revamp.addChatMessage("Der Keybind von dem Module "+args[1] +" wurde geändert");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement