Plugin dependencies

Discussion in 'Plugin Development' started by blaatz0r, Jan 27, 2011.

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

    blaatz0r

    For my Trivia plugin, I would like to provide the option to use the iConomy plugin (reward players coins for answering questions correctly).
    I got this part working by importing the iConomy plugin and then calling some methods and such.
    But the problem is that this requires all of my users to get the iConomy plugin, even if they don't want to use the coins reward.

    Is there an option to avoid this? Say, only require iConomy if they set a boolean variable in a config file.
     
  2. Offline

    eisental

    Are you using
    Plugin p = getServer().getPluginManager().getPlugin(pluginName); ?

    If so, check if p!=null to see if the plugin is installed and continue accordingly.
     
Thread Status:
Not open for further replies.

Share This Page