Code won't work

Discussion in 'Spigot Plugin Development' started by NotPexel, Jan 22, 2020.

  1. Im trying to learn using spigot.
    the code:
    https://pastebin.com/75NwLhp2

    line 15 plugin.getCommand("hello").setExecutor(this); seem to not recognize "getCommand".
    can anyone please help me solve the issue?

    i use spigot 1.8, java SE 1.8
     
    #1 NotPexel, Jan 22, 2020
    Last edited: Jan 22, 2020
  2. Are you sure your Main-class extends JavaPlugin?
     
  3. Please upload your main class and plugin.yml, in case you didn't know, that's not the right forum to ask about plugin development.
     
  4. Your main class isn't even extending the JavaPlugin class
     
  5. That's probably not his main class.

    That's a reference to his main class.
     
  6. In that case, he isn't importing it correctly, as the import for 'Main' is 'com.sun.tools.javac.Main', which is definitely not his main class.
     
  7. My bad, I didn't see that and yes, you are right, it's definitely not his main class.
     
  8. yes it does, i did extend
     
  9. my main class does extends it
     
  10. If you main class is called "Main", then you, are importing wrong main class then, please check your imports.
     
  11. DevSnx

    DevSnx Previously Snx