Could not find main class.

Discussion in 'Plugin Development' started by NoFontNL, Nov 3, 2018.

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

    NoFontNL

    Just as the title reads, when I start my Minecraft server, it reads "Could not find main class com.nofontnl.fPlugin.fPlugin"

    plugin.yml
    Code:
    main: com.nofontnl.fPlugin.fPlugin
    name: fPlugin
    version: 1.0
    author: NoFontNL
    description: Elevator
    
    And I don't know why youtubers have their package like:
    com.name.myFirstPlugin,
    but for me it just reads fPlugin without the package name. So I don't know if my main class is right.
    [​IMG]
    All help would be appreciated.
     
  2. Online

    timtower Administrator Administrator Moderator

    @NoFontNL What is the package in your main class?
     
  3. Offline

    NoFontNL

  4. Offline

    Tommy_T0mmY

    try that:
    main: fPlugin.fPlugin
     
  5. @NoFontNL

    The main in your plugin.yml needs to match package + "." + MainClass.

    So there are 2 ways to solve your problem:

    -Change the main in plugin.yml to fPlugin.fPlugin
    -Change the package of fPlugin to com.nofontnl.fPlugin

    Both ways should work equally well, but I had prefer the second way.
     
  6. Offline

    NoFontNL

    Thanks!
     
Thread Status:
Not open for further replies.

Share This Page