Discussion in 'Plugin Development' started by kevin3220, Jul 28, 2013.
Hi, is it possible to get a pressed key?;D
Not without Spout + Spoutcraft or some other client mod.
No, but you can kind of get WASD and space (or whatever their movement keys are) with PlayerMoveEvent. Use getFrom and getTo methods for x, y and z, then compare the values.
but then players need a spout client not a usual client?
Yes, unless you want to check the WASD or space keys like Assist suggested.
But is it possible to get MMB? Because in creative u can use MMB. Is it possible to get MMB pressed?
dafuq is MMB
You can also get Q (when item is dropped) and cancel the event
MMB stands for Mouse Middle Button.
How do i get Q ?
EDIT by Moderator: merged posts, please use the edit button instead of double posting.
You cant get any pressed button or key. What you can get, is the servers reaction on it. So WASD and Space will trigger PlayerMoveEvent, requiring the client uses default keymap. If someone uses IJKL and Enter for Movement, it will be this keys, but the server will never know this. Its just Movement.
Look what Events the API offers you and think about what key on clientside should trigger which event.
Separate names with a comma.