Solved Modify plugin.yml within plugin.

Discussion in 'Plugin Development' started by tacticalsk8er, Aug 16, 2013.

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

    tacticalsk8er

    Is there a way to modify the plugin.yml when the plugin is being enabled by the server? I ask this because I am working on a sort of modular plugin that will add commands and permissions if that feature is enabled in the plugins main config. If I am not clear enough just let me know, and thank you in advance.
     
  2. tacticalsk8er Yes there is, you can do: File f = getResource("plugin.yml"); and then to be able to use it like a yml config you can do: FileConfiguration yml = YamlConfiguration.loadConfiguration(f);
     
  3. Offline

    tacticalsk8er

  4. Offline

    LucasEmanuel

    It would probably just be a lot easier to capture the CommandPreProcess event to handle the new commands added by the plugins mods.
     
  5. Offline

    tacticalsk8er

    LucasEmanuel could you please provide an example as I am not familiar with this event and I am having trouble finding it in the JavaDocs
     
  6. Offline

    LucasEmanuel

  7. Offline

    tacticalsk8er

    LucasEmanuel Thank you for the example I understand how this works. Setting thread to solved.
     
Thread Status:
Not open for further replies.

Share This Page