prompt player input

Discussion in 'Plugin Development' started by atesin, Jul 25, 2014.

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



    i want to place block (or click it, or whatever event) and it automatically opens the player chat interface and waits the player input .. so the player enter some string (like the name he wish to give to the block, the color or whatever) and it gets processed

    how can i suddenly open the player chat window, wait for the user input and get processed?
  2. Offline


    I don't think the server has control over your GUI I haven't personally looked into it but I am 90% sure there is no packet for that.

    Edit: You could just not allow them to move until they type an answer and every time they attempt to move send them a message to answer.
  3. Offline


    Lazertx is right, opening the chat is handled client side and there's no way to open it using a plugin.
  4. Offline


    if i am correct, i remember i saw some plugins that do that ..

    "jail-worker" plugin seems to do that, but seems it needs the player issue the first command to start a list of questions ... i want to start the questions at once without player command but other event

    like c "scan" or javascript "prompt()"
  5. Offline


  6. Offline


    atesin When you need the player, add his uuid to a list, then listen to AsyncPlayerChatEvent and check if the uuid of the player is in the list, then get the message and do what you want with it. On the PlayerMoveEvent, make sure he cannot move by checking if his uuid is in the list or not. Really simple.
  7. Offline


    yes but that is when the player wants to type something .. not when i want the player answer me some thing .. right?

    i want the player answer me something when i want, not when he wants ...
  8. Offline


    Forgot the second part.
Thread Status:
Not open for further replies.

Share This Page