Solved Work around to using custom hotkeys without client mods

Discussion in 'Plugin Development' started by Cirno, May 31, 2014.

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

    Cirno

    What the title is trying to ask is how would I create a custom hotkey without modifying the client. My current idea is to create a chat messages and use the new JSON chat and create clickable chat messages that run a command, however, this is probably not optimal as the user needs to keep the chat box open and also the fact that chat formatting is a pain. What I'm looking to do is simple:

    Recreate this:
    [​IMG]
    in Minecraft without actually using chat, redstone, or anything that would obstruct the users view or requires modifying the world.
     
  2. Offline

    fireblast709

    Cirno you are pretty much limited to the Bukkit events without a custom client. You could use the movement to construct a WASD keypress (aside it would be pretty buggy for the server and pretty glitchy for the client), or use the sneak event for shift
     
  3. Offline

    Cirno

    I might go down this route or the chat route. Thanks :p
     
  4. Offline

    qlimax5000

    You say you wanna use the new JSON chat formatting.
    Says you don't wanna use chat...

    Good luck. Just saying.
     
  5. Offline

    AronTheGamer

    You can send JSON with this snippet:
    Code:java
    1. public void sendFormattedMessage(Player p, String json) {
    2. getServer().dispatchCommand( getServer().getConsoleCommandSender(), "tellraw " + p.getName() + " " + json);
    3. }


    Edit: forgot something
     
  6. Offline

    qlimax5000

    AronTheGamer

    That's my point..
     
  7. Offline

    fireblast709

    qlimax5000 read the initial post again, and pay special attention to the word 'however'
     
    Cirno and AronTheGamer like this.
Thread Status:
Not open for further replies.

Share This Page