Config for multiple logging plugins

Discussion in 'Plugin Development' started by bwinkl04, Jan 21, 2013.

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


    Hello all,
    I am the developer of XrayInformer. Currently we have a dependency for LogBlock, but I want to add the ability to allow users to use HawkEye and maybe even CoreProtect. What is the best way of writing in this support? I was thinking of doing a dependency check in onEnable and as long as one of them were present to then load the plugin, if non were present don't load. Then once it was loaded, because they all use different methods in the API, I would then determine which methods to call. These are my thoughts, does this seem like that right way to do this, or is there another way I should be going about this?
  2. Offline


    In your plugin.yml, do a soft depend of all three. Then, in your config, you can ask the admin to specify which plugin they're using. If the specified plugin isn't found or supported, disable your plugin and give an error.
  3. I would make 1 interface that contains the methodes you want, and then have 3 diferend implementations of that interface each for every plugin
Thread Status:
Not open for further replies.

Share This Page