Solved Make a Plugin Execute a Certain Command... From another plugin.

Discussion in 'Plugin Development' started by Rmarmorstein, Nov 28, 2012.

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


    In a plugin i am working on, i am trying to change a prefix. I am doing this with something like /prefix <color code> <prefix>

    And this will execute /pex user <command sender> prefix &f[<color><prefix>&f]

    Any suggestions? I have done searches... and nothing. I know that on the command args[0] will be the color code and args [1] will be the prefix. I just need it to execute the command.

    thanks in advance
  2. Offline


    Have the server execute the command

    Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(),String command);
  3. Offline


    So, After the comma i put the command, correct? i am getting errors when i do that, it wants to make everything a new class and such, so i could do it like this?

    I have command sender names cdsend by the way
    2. Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(),"pex user " + cdsend + " prefix &f[" + args0 + args1 + "&f]" );
  4. Offline


    Wait a minute, searching my crystal ball...
    can't find. Could you tell us the errors please? Also where exactly did you put this line to?
  5. Offline


    It was not in quotes, i was derping. Now this line looks fine, but the whole plugin is not working i made a new thread.
Thread Status:
Not open for further replies.

Share This Page