keybinds

getKeycode

int keycode = keybinds.getKeycode(String key);

Gets the code of a key.

getMousePosition

int[] position = keybinds.getMousePosition();

Returns the cursor's position.

propertyindex

x

0

y

1

isKeyDown

boolean keyDown = keybinds.isKeyDown(int key);

Returns whether the specified key is being pressed.

isMouseDown

boolean mouseDown = keybinds.isMouseDown(int mouseButton);

Returns whether the specified mouse button is being pressed (0 is left click, 1 is right click, 2 is middle click);

isPressed

boolean isPressed = keybinds.isPressed(String key);

Returns whether a keybind is pressed or not.

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 a keybind to a boolean value of pressed/unpressed. Taken from %appdata%/.minecraft/options.txt.

Last updated