keybinds

getKeycode

int code = keybinds.getKeycode(String key);

Returns the keycode for a specified minecraft keybind.

getKeyIndex

int code = keybinds.getKeyIndex(String key);

Returns the keycode for a specified key.

getMousePosition

int[] position = keybinds.getMousePosition();

Returns the position of the cursor as an array [x, y].

isKeyDown

boolean keyDown = keybinds.isKeyDown(int key);

Returns true if the specified key is being pressed.

isMouseDown

boolean mouseDown = keybinds.isMouseDown(int mouseButton);

Returns true if the specified mouse button is currently pressed. Use 0 for left click, 1 for right click, and 2 for middle click.

isPressed

boolean isPressed = keybinds.isPressed(String key);

Returns true if the specified keybind is being pressed.

leftClick

keybinds.leftClick();

Simulates a left click on the mouse.

rightClick

keybinds.rightClick();

Simulates a right click on the mouse.

setPressed

keybinds.setPressed(String key, boolean pressed);

Sets the pressed state of a specified keybind. Taken from %appdata%/.minecraft/options.txt.

Last updated