Filled CommandConfirm Plugin Request

Discussion in 'Plugin Requests' started by LordOfPex, Oct 16, 2015.

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


    Plugin category: Utilities.

    Suggested name:CommandConfirm

    What I want:
    It's basically a plugin that will let me create a confirmation to each command i define in the config. For example: If I'm usually doing /god to toggle god mode, If I will define the /god command in the config, everytime I will now issue /god, it will ask me "Are you sure you want to toggle god mode? Type yes or no."
    Then if I'll type Yes it will issue the command, and if i will type No it will cancel it (It'd be yes and no words they just type in chat to confirm or cancel). If there will be any messages of the plugin (except for those I define in the config) I would like them to be customizable.

    Look in the config examples, you will understand it better. :p

    Example of the config:
    <Command Name I will define Here>:
    Command: <The command I will define here To Issue the Commands>
    IssueCommands: <What commands the command i defined will issue (Can be multiple commands)>
    Message: <The confirmation message I will define here>
    PermissionNode: Commandconfirm.<Permission I will define here for using the command>

    Example of a defined config:
    Command: /fly
    - /fly
    Message: "&aAre you sure you want to toggle fly? Type yes or no."
    PermissionNode: Commandconfirm.flytoggle

    Example of a defined config with multiple commands:
    Command: /VIP
    - /pex user {player} group set VIP
    - /give {player} diamond_block 32
    - /broadcast {player} Just became VIP!
    Message: "&aAre you sure you want to become VIP? Type yes or no."
    PermissionNode: Commandconfirm.viprank

    Ideas for commands:
    /commandconfirm reload = Reload the config.

    Ideas for permissions:
    commandconfirm.reload = Permission to use /commandconfirm reload.

    commandconfirm.bypass.<command> = Permission to bypass a specific command confirmation.
    (For example: commandconfirm.bypass.viprank = Bypass for the 'VIPRank' commands.).

    commandconfirm.bypass.* = Permission to bypass all the command confirmations.

    When I'd like it by: About 2-3 days if possible.

    If I didn't explain it well just tell me because I feel it's a bit confusing :D

    Thanks again! :)
  2. Offline


    As far as I'm aware, you can't define permissions anywhere but the plugin.yml; it's not a configurable thing.

    I could do this for you, but I think this plugin would be a great learning experience for someone else. I'll wait until tomorrow, and if no-one else has picked it up, I'll do it for you
  3. @Scimiguy You can make commands configurable actually :)

    Check when they do a command.
    Check the config for that command
    Check if the user has the permission of the command in the config. (hasPermission(getConfig().getString("Path.permission")))
  4. Offline


    If that's true, then why do we define permissions nodes in plugin.yml?
  5. @Scimiguy You can put perms in the plugin.yml (Not needed) so that you or other plugins can get the permissions of that plugin.
  6. Offline



    Ah. Anyway,

  7. Offline


    Thank you so much!
  8. Offline


    You can make permissions configurable. For example

  9. Offline


  10. Offline


    Ah right, forgot about this one -- Sorry!
    If I get time I'll try do it sometime soon
  11. Offline


    How much will it take?
  12. Offline


    Long enough.

    I've done just about everything, only thing that isn't working yet is the new commands

    I felt like this could benefit a lot more people, so I'm properly developing it and I'll be putting it on BukkitDev when it's done
  13. Offline


    If everything is done and only one thing is not working, Shouldn't it take a short time? xD
  14. Offline


    I see no point of this plugin, /god. Are you sure? Type yes or no.

    I just see that as a pain but this could be useful if you don't want to do /stop and you do it anyways and it's a safeguard, this would just be annoying for players.
  15. Offline


    cool idea! Wanna download :)
  16. Offline


    Yes, but like most people; I work full time aswell

    The confirming is only a minor part of it.
    You can also chain pre-set commands based on one

    It's not wholly useful, but neither is a lot of other plugins.
    This guy wants it, so I'm making it for him.

    @UnseenMC @LordOfPex

    Ok so funny story.. it turns out I was finished, I just forgot to check for one thing.

    Anyway, you'll be able to find it here:

    Please mark this thread as filled if this satisfies you
    Last edited: Oct 20, 2015
  17. Offline


    Oh wow the plugin is perfect!

    Just 3 things:
    1. When I'm trying to do /plock reload nothing happens. It's not reloading and not saying anything in chat.

    2. When I'm saying "no" to cancel a command, nothing happens. Can you maybe add a cancellation message in config that will be shown if a player cancels a command execution?

    3. Are there any variables? Such as %player% and %executer% etc.. (Useful for a lot of commands)

    4. Can you also add permission message? So for example, If someone with a permission to a command will try to do that command, he will get a configurable no permission message. (At the moment it just says "Unkown command, Try "/Help" for help).
    Last edited: Oct 20, 2015
  18. Offline


    Updated to V1.1, should solve all those issues
  19. Offline


    Okay, I tested the new version, It's literally working like a charm!

    Another addon I wanted to ask if possible:
    Can you add the option to make a chain command to be executed for another player?
    For example:
    vip <name>: (It will ask me to add a name when I'll peform this command, So for example I'll do /vip Awesome1)
    ConfirmMessage: "&6Are you sure you want make <name> a VIP?"
    Permission: "vip.others"
    PermissionMessage: "You are not allowed to do that."
    - "pex user <name> group set Vip"
    You added <player> for the name of the player that performing the command, I want to be able to do a command but add the name of another player to execute it on him.

    Another thing I found: I can't use color codes in the PermissionMessage messages.

    Thanks again!
  20. Offline


    I was considering allowing arguments like your <name> thing there, but I couldn't decide on a way I was happy with.
    Gimme a day or two
  21. Offline


    Anything new? :)
  22. Offline


    Well I moved house, if that counts for anything

    Decided on how I want to do it, but I'm exhausted atm
  23. Offline


    Last edited: Oct 24, 2015
  24. Offline

    I Al Istannen

    @Ruptur I don't quite understand what you did there... To me it looks like @Scimiguy is doing the plugin and has already done a major part of the requested features. He even released it on DevBukkit.

    Why did you create it again? And do you know about that or more specific BooleanPrompt or RegExPrompt? Would have made the map, the AsyncPlayerChatEvent listener and the PlayerQuitEventListener obsolete. I think it is a nicer way, but that may be personal preference.

    I also don't get why the permisison "commandconfirm.reload" has the description: "Warping to a base".
  25. Offline


    @I Al Istannen
    I actually recieved this exact request through a private message a few weeks back but had alot of work to do that meant i wasnt able to finish til now.

    A conversation with a RegExPrompt was what i initially gone for but later changed it due to the fact i feel more comfortable with using a map and a AsyncPlayerChatEvent.

    My bad just updated link -
  26. Offline


  27. Offline


  28. Offline


    What's more interesting is that the person who sent you that is a different person to the OP here

    Anyway, @LordOfPex
    The update should be finished tonight.. I'll let you know

    Done, update 1.2.1
    Last edited: Oct 26, 2015
  29. Offline


    Hey, Thanks! I still can't download the new version though, Still need to wait for BukkitDev to approve it or something?
  30. Offline


    Pretty Much, keep an eye on it.. shouldn't be long

    If you have any further issues with the plugin, post it on the BukkitDev page please
Thread Status:
Not open for further replies.

Share This Page