- Joined
- Jan 23, 2017
- Messages
- 13
- Thread Author
- #1
I want my player to select a target ingame using the right click on it. How do I detect a user's clicks?
Thanks
Thanks
By registering with us, you'll be able to discuss, share and private message with other members of our community.
Sign up now!Implementing the mouselistener interface and adding the instance to the bot's event dispatcher.I want my player to select a target ingame using the right click on it. How do I detect a user's clicks?
Thanks
Thanks for your reply!Implementing the mouselistener interface and adding the instance to the bot's event dispatcher.
Have you added the listener to the bot's event dispatcher?Thanks for your reply!
I got some of the code but I can't get this to work.
So far I've got this:
... implements MouseListener ...
@Override
public void mouseClicked(MouseEvent arg0) {
demo.logMessage(arg0.getButton() + "");
if(arg0.getButton() == MouseEvent.BUTTON2) {
demo.logMessage((Mouse.getTarget() == null) + "ttt");
}
}
the demo.logMessage is where my output goes to but there is no output in any case.
I did. Forgot to mentionHave you added the listener to the bot's event dispatcher?
i'm not sure about it but since we moved on to using the official client, the input listeners may not be supported anymore.I did. Forgot to mention
i'm not sure about it but since we moved on to using the official client, the input listeners may not be supported anymore.
@Party?
We use essential cookies to make this site work, and optional cookies to enhance your experience.