Reading commands out of plugin.yml

Discussion in 'Plugin Development' started by Lathanael, Aug 5, 2011.

Thread Status:
Not open for further replies.
  1. Is there an easy way to read the name of the commands which are written down in the plugin.yml inside the plugin .jar to a String.
    I'd like to have an Array or similar of Strings which contains the command names.
    Something like the following.

    In plugin.yml:

    Code:
    commands:
      com1:
          description:
          aliases:
          usage:
      com2:
          description:
          aliases:
          usage:
    
    And if read i get 2 Strings, com1, com2.
    I have searched a lot today but either i'm unable to use the right search phrases or it is nowhere described (i guess the first one is the case ;))
    So if anyone knows a way or got an link where it is described pls inform me.

    Help appreciated!
    cheers
    Lathanael
     
  2. Offline

    Shamebot

    Try
    Code:java
    1. this.getClass().getResourceAsStream("plugin.yml");

    to get it as stream, didn't test it.
     
Thread Status:
Not open for further replies.

Share This Page