Solved Declaring commands at runtime

Discussion in 'Plugin Development' started by Chloe-chan, Dec 26, 2015.

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

    Chloe-chan

    Hello,

    I'll like to know if there are any ways to declare commands on runtime, or do I have to manually listen for PlayerCommandPreprocessEvent ? Thanks in advance, and happy holidays.

    Cheers,
    ChloeChan
     
  2. Offline

    mine-care

  3. Offline

    DoggyCode™

    You can run commands on run time. Just make one and use the execute command method
     
  4. Offline

    Chloe-chan

    I meant registering commands at runtime, not executing them. Sorry for the confusion.

    @mine-care I'll check it out when I get home, thanks !
     
  5. @Chloe-chan I'm quite sure that you need to use Reflection to register them during runtime. I was curious about this as well though, so if you discover something, please post :p
     
  6. Offline

    Xerox262

    Read @mine-care's message, he supplied a link to his utility, he explains how to register it, and supplies the code that you will need in order to do it.
     
    mine-care likes this.
  7. Offline

    teej107

  8. Offline

    Chloe-chan

    Sorry for the necro, solved it using @mine-care's library. Thanks!
    Used in this project.
     
    mine-care likes this.
Thread Status:
Not open for further replies.

Share This Page