Solved Trying to declare what 'plugin' is

Discussion in 'Plugin Development' started by thomasb454, Nov 5, 2013.

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

    thomasb454

    Hi guys, I'm trying to declare what 'plugin' is, in a class that doesn't implement command ex, and if you're wondering why I need this it's because I need to get a prefix from the config and place it in my message class, hope that made some sense :confused:


    Thanks in advance,
    Thomas.
     
  2. Offline

    RealDope

    In second class:
    Code:JAVA
    1.  
    2. <mainclassname> plugin;
    3. public <classname>(<mainclassname> plugin) {
    4. this.plugin = plugin;
    5. }
    6.  


    In main class:
    Code:JAVA
    1.  
    2. public void onEnable() {
    3. <secondclass> second = new <secondclass>(this);
    4. }
    5.  
     
  3. Offline

    thomasb454

    I'll give this a go, thanks.


    Didn't work; Messages() in Messages cannot applied to com.firenation.heal.Main
     
  4. Offline

    Janmm14

    thomasb454
    <classname> in the first box is the name of the second class. If that is the casegive us some code.
     
  5. Offline

    RealDope

    Show code, if it didn't work you did it wrong.
     
  6. Offline

    thomasb454

    RealDope Janmm14

    So after going to school and turning my PC back on, it appears to work. Mhhh odd :confused:
     
  7. Offline

    RealDope

    Sounds like you didn't export the new version of your project to your server the first time around.
     
Thread Status:
Not open for further replies.

Share This Page