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



    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:
    1. public CarePackage plugin;
    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!

  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