public class Mouse extends API
Modifier and Type | Class and Description |
---|---|
static class |
Mouse.CrossHairColor
An enum representing the state of the mouse cursor of the client.
|
bank, bot, camera, chatbox, client, colorPicker, combat, configs, depositBox, dialogues, diaries, display, doorHandler, equipment, experienceTracker, favour, grandExchange, graphicObjects, groundItems, hintArrow, inventory, keyboard, logger, logoutTab, magic, map, menu, mouse, npcs, objects, players, prayer, projectiles, quests, settings, skills, store, tabs, trade, walking, widgets, worlds
Constructor and Description |
---|
Mouse() |
Modifier and Type | Method and Description |
---|---|
boolean |
click(boolean rightClick)
Performs a mouse click.
|
boolean |
click(int x,
int y,
boolean rightClick)
Moves the mouse to the specified destination.
|
boolean |
click(MouseDestination destination)
Moves the mouse to the specified destination and performs a left click on
the destination.
|
boolean |
click(MouseDestination destination,
boolean rightClick)
Moves the mouse to the specified destination and performs a left or a
right click as specified on the destination.
|
boolean |
continualClick(MouseDestination destination,
Condition condition)
Moves the mouse to the specified destination and performs a left click
for as long as the condition evaluates to false.
|
boolean |
continualClick(MouseDestination destination,
Condition condition,
boolean rightClick)
Moves the mouse to the specified destination and performs a click for as
long as the condition evaluates to false.
|
java.awt.Color |
getColor()
Gets the color at the mouse cursor.
|
Mouse.CrossHairColor |
getCrossHairColor()
Returns the current state/color of the mouse cross hair of the client.
|
java.util.List<Entity> |
getEntitiesOnCursor()
Returns a list of actively interact-able entities being hovered over by
the mouse cursor.
|
java.awt.event.MouseListener |
getListener()
Gets the client's mouse listener.
|
int |
getOnCursorCount()
The number of entities with options under your cursor.
|
java.awt.Point |
getPosition()
Gets the current mouse position.
|
void |
initializeModule() |
boolean |
isDefaultPaintEnabled()
Checks if the default mouse debug paint is disabled or not
|
boolean |
isOnCursor(Entity entity)
Returns if this entity is on the cursor/mouse position.
|
boolean |
isOnScreen()
Detects if the mouse is on the game screen.
|
boolean |
move(int x,
int y)
Moves the mouse to the specified destination.
|
boolean |
move(MouseDestination destination)
Moves the mouse to the specified destination.
|
boolean |
move(MouseDestination destination,
boolean drag)
Moves the mouse to the specified destination.
|
boolean |
moveOutsideScreen()
Moves the mouse to a random position outside the screen.
|
void |
scrollDown() |
void |
scrollUp() |
void |
setDefaultPaintEnabled(boolean on)
Sets the default mouse debug paint on or off
|
exchangeContext, execute, getBank, getBot, getCamera, getChatbox, getClient, getColorPicker, getCombat, getConfigs, getDepositBox, getDialogues, getDiaries, getDisplay, getDoorHandler, getEquipment, getExperienceTracker, getFavour, getGrandExchange, getGraphicObjects, getGroundItems, getHintArrow, getInventory, getKeyboard, getLogoutTab, getMagic, getMap, getMenuAPI, getMouse, getNpcs, getObjects, getPlayers, getPrayer, getProjectiles, getQuests, getSettings, getSkills, getStore, getTabs, getTrade, getWalking, getWidgets, getWorlds, gRandom, gRandom, gRandom, initializeContext, log, log, myPlayer, myPosition, random, random, sleep, stripFormatting, warn
public boolean isDefaultPaintEnabled()
public void setDefaultPaintEnabled(boolean on)
on
- Set the default mouse debug paint on or offpublic int getOnCursorCount()
public final boolean moveOutsideScreen()
public boolean isOnScreen()
public final boolean move(MouseDestination destination)
destination
- The destination to move the mouse to.public final boolean move(MouseDestination destination, boolean drag)
destination
- The destination to move the mouse to.drag
- Whether to hold the left mouse button whilst moving the mouse.public java.awt.Color getColor()
public final boolean move(int x, int y)
x
- The x coordinate to move to.y
- The y coordinate to move to.public final boolean click(int x, int y, boolean rightClick)
x
- The x coordinate to move to.y
- The y coordinate to move to.rightClick
- True to right click, False to left clickpublic final boolean click(MouseDestination destination)
destination
- The destination to click.public final boolean click(boolean rightClick)
rightClick
- Whether to perform right clickpublic final boolean click(MouseDestination destination, boolean rightClick)
destination
- The destination to click.rightClick
- Whether to right click the destination.public final boolean continualClick(MouseDestination destination, Condition condition)
destination
- The destination to click.condition
- The conditions for which as long as it's false the click will
continue.public final boolean continualClick(MouseDestination destination, Condition condition, boolean rightClick)
destination
- The destination to click.condition
- The condition for which as long as it's false the click will
continue.rightClick
- Whether to use the right mouse button button to click.public boolean isOnCursor(Entity entity)
entity
- The entity to checkpublic java.util.List<Entity> getEntitiesOnCursor()
public java.awt.event.MouseListener getListener()
public java.awt.Point getPosition()
public void scrollUp()
public void scrollDown()
public void initializeModule()
initializeModule
in class API
public Mouse.CrossHairColor getCrossHairColor()