How to execute different commands inside a command?

Discussion in 'Plugin Development' started by James | Buchanan, Apr 4, 2012.

Thread Status:
Not open for further replies.
  1. Hello,

    So, i have a command, /acceptrules <password> which when executed, does the command /pex user <user> group set Default. But, i need it to be done by someone(or something) besides the player that used the command, any ideas?

    Thanks in advance :D

    Not sure if this was clear enough, sorry about that :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2016
  2. Offline

    Sagacious_Zed Bukkit Docs

    the Server can dispatch a command. please refer to the Javadocs on the parameters to the method. The exact syntax is left as an exercise for the reader.
     
  3. Offline

    Don Redhorse

    a) you might want to look into vault to handle this for different plugins... but you still will need to figure out how to do it correctly OR
    b) you need to use the pex api

    take a look at the code of makememod on dev.bukkit I do something similar... both with vault and with pex directly
     
  4. i used Bukkit.getServer().dispatchCommand(ConsoleCommandSender, "pex user blah blah bah");
    But thanks for the help!
     
Thread Status:
Not open for further replies.

Share This Page