Command Argument Prompter

Discussion in 'Archived: Plugin Requests' started by Tommiek, May 18, 2014.

  1. Offline

    Tommiek

    Hey guys,

    I have a menu on my server to replace commands. I use ChestCommands for it, but commands like /tp <playername> require user input, which can't be done in ChestCommands. So that's why I am requesting this plugin.

    Suggested name: ArgumentPrompter

    What I want: A plugin that detects commands with curly braces in it. When a command with curly braces in it is detected, it will send a chat message to the executor of the command with the text in between the curly braces. The next chat message of the player will not be shown in chat, but will be saved by the plugin. The plugin will execute the command that the player send with curly braces, and replace the the curly braces and the text in between by what the player entered in chat and what was saved. If there are more texts in curly braces in the command, they will be prompted to the player one by one, and the next prompt will pop-up after the player entered a chat message for the prompt before. This explanation might be a little confusing, so here's an example:

    The player Bob executes the command: "/pay {&7Please enter the playername you want to pay money to:} {&7Please enter the amount of money you want to send:}". What will happen is that a message saying: "Please enter the playername you want to pay money to:" will appear in his chat. Bob will now enter a playername, so for example John. When he presses enter, the text "John" will not appear in the chat. A message will appear saying this: "Please enter the amount of money you want to send". Bob enters 100 for example, and the plugin will execute the following command as Bob: "/pay John 100".

    With this plugin I can put in the ChestCommands config a command with curly braces like the pay command, and this plugin will ask the player what he wants as the command arguments.

    Ideas for commands: No commands needed for this plugin. The plugin will detect when curly braces are used in any command.

    Ideas for permissions: No permissions, everyone has permission.

    When I'd like it by: ASAP, it shouldn't be really hard to make :)
     
  2. Offline

    The Fancy Whale

    This is actually very challenging to make because it would have to work with all of the plugins on your server.
     
  3. Offline

    timtower Administrator Administrator Moderator

    The fact that it is based on curly brackets makes it easier though.
     
  4. Offline

    danieltabrizian

    timtower no effence but why are you looking on all the threads and posting usefull information without creating any plugins your self?
     
  5. Offline

    DxDy

    I'll have a go at it.
     
  6. Offline

    timtower Administrator Administrator Moderator

    I do make plugin on my own, but not always, don't always have access to my laptop either.
     
  7. Offline

    DxDy

    Tommiek
    Finished it. Will put a BukkitDev-Page up shortly and edit the link into this post as soon as it's approved ;)
     
  8. Offline

    Tommiek

    You're truly amazing! Thanks so much! :D Can you give me the name of the project so I can check for myself if it's approved or not yet? By the way, I would put in the description that it can be used with any menu plugin, I think I'm not the online who needs this. I hope you'll get a lot of downloads ;)
     
  9. Offline

    DxDy

    There's the link: http://dev.bukkit.org/bukkit-plugins/argumentprompt/
    Currently working on a better documentation :D
     
  10. Offline

    Tommiek

    Downloaded it with a little workaround. Testing it now..

    Okay, everything works, except that I couldn't chat anymore after doing a command with curly braces. Could you fix that and upload a new version as 1.1?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  11. Offline

    DxDy

    We'll just call that a fail on my part :D Uploaded the new version, although on the same filename as before.
     
  12. Offline

    Tommiek

    Awesome, thanks for fixing it :p
    Downloaded the new version, gonna try it in a second..
     
  13. Offline

    Necrodoom

    DxDy Tommiek this can mess with minecraft command JSON arguments which use {} to dictate them, like /tellraw.
     
  14. Offline

    Tommiek

    Hmh.. Didn't thought of that. Let me thing of another character.. Maybe []? Or just ()? Or "", or ''? Or maybe <>?
     
  15. Offline

    DxDy

    The design is flexible, just choose one^^
     
  16. Offline

    Necrodoom

    <> seems to be the best option, most rarely used.
     

Share This Page