interact with another plugin

Discussion in 'Plugin Development' started by goodstuff20, May 21, 2013.

Thread Status:
Not open for further replies.
  1. Hi guys,

    i wanted to know how to interact with another plugin for example iconomy. For example if i want to make a plugin where you have to pay to have limited time to fly - how would i interact with the money plugin?

    All help apreciated!

    cheers
     
  2. Offline

    Jogy34

    I would suggest hooking into vault if you need to get into an economy plugin. I believe they have instructions on how to hook into it on their page.
     
  3. yeah but how do you then add "vault" into your code?
    thx though
     
  4. Offline

    timtower Administrator Administrator Moderator

    goodstuff20
    Code:
    private boolean setupEconomy() {
            if (getServer().getPluginManager().getPlugin("Vault") == null) {
                return false;
            }
            RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
            if (rsp == null) {
                return false;
            }
            econ = rsp.getProvider();
            return econ != null;
        }
     
  5. Offline

    Jogy34

    You import the .jar just like you do with the bukkit.jar
     
  6. Thx

    I didnt mean that - thx for your help though - meant that what timtower wrote

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
    timtower likes this.
Thread Status:
Not open for further replies.

Share This Page