Getting plugin in seperate class

Discussion in 'Plugin Development' started by scarabcoder, Dec 11, 2013.

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

    scarabcoder

    I want to get the plugin in a separate class file (in the same package). Using 'this' only returns the menu.class file that I am using, not plugin.
     
  2. Offline

    Garris0n

    Use a constructor that takes an instance of your main class.
     
  3. Offline

    RawCode

    public yourplugin instance = this (inside onenabled or any other non static method that ensured to run)

    then access this variable and do whatever you want with it.
     
  4. Offline

    scarabcoder

Thread Status:
Not open for further replies.

Share This Page