Skip to content

Commit 9fee550

Browse files
committed
New Keyboard Manager
1 parent 43bb348 commit 9fee550

14 files changed

Lines changed: 1681 additions & 57 deletions

src/main/java/net/wurstclient/command/CmdList.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public final class CmdList
4949
public final IpCmd ipCmd = new IpCmd();
5050
public final ItemListCmd itemListCmd = new ItemListCmd();
5151
public final JumpCmd jumpCmd = new JumpCmd();
52+
public final KeyboardCmd keyboardCmd = new KeyboardCmd();
53+
public final KeymapCmd keymapCmd = new KeymapCmd();
5254
public final LeaveCmd leaveCmd = new LeaveCmd();
5355
public final LivestreamCmd livestreamCmd = new LivestreamCmd();
5456
public final MapaCmd mapaCmd = new MapaCmd();

src/main/java/net/wurstclient/commands/AutoFlyCmd.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ public void call(String[] args) throws CmdException
6767
if(cmd.equalsIgnoreCase("stop") || cmd.equalsIgnoreCase("off")
6868
|| cmd.equalsIgnoreCase("disable"))
6969
{
70-
if(WURST.getHax().autoFlyHack.isEnabled())
71-
WURST.getHax().autoFlyHack.setEnabled(false);
70+
WURST.getHax().autoFlyHack.stopFromCommand();
7271
return;
7372
}
7473
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2014-2026 Wurst-Imperium and contributors.
3+
*
4+
* This source code is subject to the terms of the GNU General Public
5+
* License, version 3. If a copy of the GPL was not distributed with this
6+
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
7+
*/
8+
package net.wurstclient.commands;
9+
10+
import net.wurstclient.DontBlock;
11+
import net.wurstclient.command.CmdException;
12+
import net.wurstclient.command.CmdSyntaxError;
13+
import net.wurstclient.command.Command;
14+
import net.wurstclient.keymap.KeyboardBindsScreen;
15+
16+
@DontBlock
17+
public final class KeyboardCmd extends Command
18+
{
19+
public KeyboardCmd()
20+
{
21+
super("keyboard", "Opens the keyboard keymap screen.", ".keyboard");
22+
}
23+
24+
@Override
25+
public void call(String[] args) throws CmdException
26+
{
27+
if(args.length != 0)
28+
throw new CmdSyntaxError();
29+
30+
MC.gui.setScreen(new KeyboardBindsScreen(MC.gui.screen()));
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2014-2026 Wurst-Imperium and contributors.
3+
*
4+
* This source code is subject to the terms of the GNU General Public
5+
* License, version 3. If a copy of the GPL was not distributed with this
6+
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
7+
*/
8+
package net.wurstclient.commands;
9+
10+
import net.wurstclient.DontBlock;
11+
import net.wurstclient.command.CmdException;
12+
import net.wurstclient.command.CmdSyntaxError;
13+
import net.wurstclient.command.Command;
14+
import net.wurstclient.keymap.KeyboardBindsScreen;
15+
16+
@DontBlock
17+
public final class KeymapCmd extends Command
18+
{
19+
public KeymapCmd()
20+
{
21+
super("keymap", "Opens the keyboard keymap screen.", ".keymap");
22+
}
23+
24+
@Override
25+
public void call(String[] args) throws CmdException
26+
{
27+
if(args.length != 0)
28+
throw new CmdSyntaxError();
29+
30+
MC.gui.setScreen(new KeyboardBindsScreen(MC.gui.screen()));
31+
}
32+
}

0 commit comments

Comments
 (0)