Getting Arrow Key input

Discussion in 'Plugin Development' started by jacklin213, Jun 9, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    jacklin213

    Im not sure if it is possible , But can you get arrow keys input from someones keyboard.

    (yes i have heard about how thats client side) but i would like to know if there is anyway around this
     
  2. Offline

    Rocoty

    This is impossible in Bukkit. You'd have to make your own client and server to send and receive the appropriate data.
     
  3. Offline

    skipperguy12

    I don't think so,
    If it's handled client side, and no information about it is sent to the server, why do you ask?
    There usually is no way around it...
     
  4. Offline

    jacklin213

    I know spout can do this though, but is there way very complicated?
     
  5. Offline

    Jatoc


    No. You would just have to use Spout methods to obtain the info. Just like coding with the Bukkit API.
     
  6. Offline

    jacklin213

    wait , is there any keys which the bukkit API looks for?
     
  7. Offline

    JazzaG


    Nope, the client doesn't send keys to the server unless it's in a text box or something, it sends actions which are mapped to keys.
     
  8. Offline

    TheTrixsta


    I believe the Minecraft client normally sends the KeyStroke inputs through the server, but not sure. There is always a possibility for something!

    Edit: I think I might be wrong [​IMG]
     
  9. Offline

    kreashenz

    Why not Keystroke API? That would be amazingly helpful for hacksor plugins (not that anyone would want one), and would be great for anti-hack plugins, it all works vice-versa.
     
  10. Offline

    GodzOfMadness

    kreashenz That would be terrible for anti-hack plugins! What if someone's key to open their inventory was one of the default keys for like xray or fly hack.
     
  11. Offline

    kreashenz

    GodzOfMadness I thought of that AFTER I posted it.. About 10 minutes after.
     
  12. Offline

    ZeusAllMighty11

    There is no way at this time.
     
  13. Offline

    desht

    The Minecraft protocol is well-documented here: http://www.wiki.vg/Protocol - if you read that, you'll see that the client doesn't any packets with keypress information to the server at this time. So catching keypresses with Bukkit or even direct NMS calls is completely impossible.
     
    TheTrixsta and microgeek like this.
  14. Offline

    jacklin213

    NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. just wondering how spout does it
     
  15. Offline

    desht

    By using a modified client, of course. The Spout protocol (spoutcraft <-> SpoutPlugin) includes packets for keypress events.
     
  16. Offline

    jacklin213

    oh right , *facepalm* forgot spout has there own client
     
Thread Status:
Not open for further replies.

Share This Page