How to getConfig() from a class that isn't main

Discussion in 'Plugin Development' started by Smalltrout, Dec 1, 2014.

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

    Smalltrout

    Hello,

    I need help figuring out how to get a string from the config in a class that isnt the main. Whenever i try this in the second class:
    Code:java
    1. public CarePackage plugin;
    2.  
    3. public MediumCarePackage(CarePackage plugin)
    4. {
    5. this.plugin = plugin;
    6. }

    It gives me an error in the main class when i register the events of the second class. (The constructer MediumCarePackage() is undefined.)

    All help is appreciated!

    Thanks!
     
  2. Smalltrout You're supposed to pass the instance of the main class when instantiating the class ;)
     
  3. constructors
     
Thread Status:
Not open for further replies.

Share This Page