[HELP] commands.yml player?

Discussion in 'Spigot Help' started by w1zard, Mar 14, 2019.

  1. I'm trying to add a command when a player does /join-fire they current player will join the group fire.
    command:
    aliases:
    icanhasbukkit:
    - version $1-
    begin:
    - warp begin
    join-fire:
    - pex user (what do I put here for the current player using the command!) group add Fire
     
  2. Hello,

    This will not work. Because when the player will execute /join-fire, it will execute /pex command, and the player will need permission for PEX usage.

    So, unless you add PEX command usage permission for everyone(that means everybody will can modify player permissions), this will not work.
     
    #2 Andross, Mar 14, 2019
    Last edited: Mar 14, 2019
  3. So you're saying theres no way to make a command like this?
     
  4. No, not like this.

    The only solution I see, is to make a plugin for your command.. Or there is maybe a plugin that can execute command aliases with OP permission, or something like that, but i don't know one.
     
  5. Maybe with a command block? Might not work in 1.13, though.
     
  6. Thanks everyone I'll figure out something I guess, but what would I put for the part where I put players name?!??
     
  7. With a command block, @p will target the closest player, not necessarily the one who activated the command block (by pushing a button, etc). Again, this may not work with 1.13.2.
     
  8. I'm not gonna use a command block but in the commands.yml file what would I put to like give the player doing the command an item
     
  9. You can't.
     
  10. I'm actually coding something that will helps you, w1zard.
    Tomorrow, i'll upload it. :)
     
  11. Thank You!! :D:):love:
     
  12. Done!
    Here is the plugin: https://www.spigotmc.org/resources/commandexecutor.65635/
    ---------------------------------------------------------------
    Usage:
    1. Open config.yml and write in the commands you want to execute
    Code (Text):
    commands:
      joinfire:
      - 'pex user %player% group add Fire'
    2. Open 'commands.yml' and add the new alias, with your new command name:
    Code (Text):
      join-fire:
      - commandexecutor joinfire
    3. Reload your server
    4. Done! (when a player enter /join-fire, the console will execute the commands listed in config.yml)
    ---------------------------------------------------------------
    The plugin will be updated and new features/configurations will be added!
     
    #12 Andross, Mar 14, 2019
    Last edited: Mar 15, 2019
  13. I submitted a PR to Spigot to support this but it was denied. It would work in Paper without plugins as

    pex user $sender group add Fire
     
    • Winner Winner x 1
  14. Thanks It Works Great!! But One question, is there a way for me to teleport the player to a world after using the command?
     
  15. Sure!

    In the config.yml, just replace:
    Code (Text):
    joinfire:
      - 'pex user %player% group add Fire'
    by: (replace the teleport command by the command you want)
    Code (Text):
    joinfire:
      - 'pex user %player% group add Fire'
      - 'teleport %player% WhereYouWantTo'
    You can even send to the player a personnal message, something like:
    Code (Text):
    joinfire:
      - 'pex user %player% group add Fire'
      - '%sendMessage%&2You joined the fire group!'
      - 'teleport %player% WhereYouWantTo'
     
  16. Hey, can you help me?
    I want command like prefix vip:
    but in commands.yml I cant make space (look screen)
    I can only prefixvip:

    how i can do it?
    upload_2020-1-21_21-10-18.png
     
  17. Hello,

    You can not use commands with spaces in commands.yml. You'll need a plugin, like MyCommand.
     
  18. Thank you for answer
    Do you now plugin where i can make custom menu (GUI) with per group perms?
     
  19. Once again...genius! So I'm given player temp fly and.......
    Code (YAML):
    flytime:
     - lp user $sender permission info
    works perfectly in Paper 1.12.2. Ofc this will show all of their user perms, but that's fine. Thankfully Luck coded in some nice formatting too.

    Seriously @Aikar ...thank you for all you do!!

    Paper allows it...not sure about Spigot.
     
  20. Why did you say this when you literally posted before about commands with spaces lol.