How to make one command run a different one.

Discussion in 'Plugin Development' started by super292, Oct 22, 2013.

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

    super292

    Hello guys. Today I have a rather simple question that I'm sure most of you know the answer to (I'm new to coding). So If I wanted the command I made to run another command that's already used by a plugin or that is on the server, how would I do that. I want to make /Parkour to run a command I previously made in a different plugin. Whats the line of code for making a user run a command that's already in the server? Thanks a lot!
     
  2. Offline

    MyNameIsHariK

    to make a player run a command I believe it is this
    Code:java
    1. Player player = e.getPlayer();//to get player
    2. player.chat("/command");//run command
     
    super292 likes this.
  3. Offline

    Minecrell

    super292
    Code:java
    1. player.performCommand("command");
     
    super292 likes this.
  4. Offline

    super292

    Minecrell
    Thanks for the help!!!!
     
Thread Status:
Not open for further replies.

Share This Page