Why does my getPluginbyName() always come up null

  • It used to work in the Java version just fine. Now every time I try to access a database of another plugin I get a null for the path. Is there a new trick?

    This is how i do it. probably not the correct way

    Java
    public static Coins coins;
    this.coins = (Coins)this.getPluginByName("WTG Currency");
  • This is how i do it. probably not the correct way

    Java
    public static Coins coins;
    this.coins = (Coins)this.getPluginByName("WTG Currency");

    Hey thanks, It turned out to be a simple issue when I converted the plugin.


    The name you call out in the getPluginByName() has to be exact (case sensitive) to the name in the .YML file Name and not the name of the plugin.java or plugin directory. In my case it was a text case issue. The name line in .YML file was capitalized and the java.file was not.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!