Solved Creating Commands AFTER Launch

Discussion in 'Plugin Development' started by Zachster, May 10, 2013.

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

    Zachster

    This may seem like a weird question, but is there a way to programmatically create new commands after a plugin has been installed and is running on the server besides making a chat listener?
     
  2. Offline

    ZeusAllMighty11

    Please elaborate?

    You can not dynamically add to the plugin.yml AFAIK while the jar is being used
     
  3. Offline

    Sagacious_Zed Bukkit Docs

    The Bukkit API does not support the additions of commands programmatically during runtime. You may work around this problem by having a command do different things based on game state and arguments to that command however.
     
  4. Offline

    Zachster

    I didn't think this would work. I was wanting to make a plugin where you could create your own commands from a list of other commands. For example. (I know you can do this with kits its just an example) you can make /foo that will do /give player 50 then /give player 2 then /give player 123
     
  5. Offline

    LazyLemons

    You can use PlayerCommandPreprocessEvent.
     
  6. Offline

    Zachster

    Thanks. I'll keep that in mind.
     
Thread Status:
Not open for further replies.

Share This Page