Plugin will not load

Discussion in 'Plugin Development' started by Jbitters3, Jul 22, 2013.

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

    Jbitters3

    I just finished coding my plugin and when I start my server up it gives me this error.
    Code:
    org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:132)
    22.07 23:38:11 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:252)
    22.07 23:38:11 [Server] INFO at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:188)
    22.07 23:38:11 [Server] INFO at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:849)
    22.07 23:38:11 [Server] INFO org.bukkit.plugin.InvalidDescriptionException: commands are of wrong type
    22.07 23:38:11 [Server] SEVERE Could not load 'plugins/Paintballer.jar' in folder 'plugins'
     
  2. Offline

    microgeek

    Your plugin.yml is not formatted correctly.
     
  3. Offline

    Jbitters3

    microgeek this is my format
    Code:
    name: Paintball
    main: Main.Paintball
    version: 1.0.1
    authors: [jbitters]
    description: Paintball for minecraft
    commands:
      red:
        description: Join the red team
      blue:
        description: Join the blue team
      random:
        description: Join a random team
      leave:
        description: Leave the current team your on
      shop:
        description: Base of the shop command
        aliases: [sp]
      whisper:
        description: Talk to another player
        aliases: [wp]
      spawn:
        description: Teleport back to spawn
      setspawn:
        description: Set the spawn
        aliases: [ss]
      paintball:
        description: Main command
      vipslowdown:
        description: VIP slowdown perk
      vipconfusion:
        description: VIP confusion perk
      vipsnowball:
        description: More snowballs for VIP
      setteamspawn:
        description: Set team spawn
      setarena:
        description: Set arena
      setteamflag:
        description: Set team flag
      done:
        description: Base of the vote command
      depend: [Vault]
     
  4. Offline

    SnipsRevival

    depend: [Vault] should not be under commands.
     
  5. Offline

    Jbitters3

  6. Offline

    SnipsRevival

    With the rest of the stuff at the top.
     
  7. Offline

    Jbitters3

  8. Offline

    SnipsRevival

    Your main may be wrong. If your package is not called Main and your main class is not called Paintball, it is wrong.
     
  9. Offline

    xTrollxDudex

    Jbitters3
    Some spacing errors. But maybe thats just the copy-paste issue
     
    microgeek likes this.
  10. Offline

    Vexil

    never use tabs in a plugin.yml. if you used tabs for your spaces, remove them, and put 4 spaces where the tabs were, for instance
    Code:
    commands:
    [1234]command:
    [12345678]description: desc
    or, click your last line and check if there are spaces after the last line. if there are, remove them. These are what usually happens to me, hope this helps! :D

    EDIT: authors should be author also, even if there are multiple authors. its how bukkit reads the files.
     
  11. Offline

    Jbitters3

    xTrollxDudex BenCS_ When I'm on eclipse it says when I export, JAR creation failed. See details for additional information.
    Resource is out of sync with the file system: '/Paintball/plugin.yml'.
     
  12. Offline

    Vexil

  13. Offline

    Jbitters3

  14. Offline

    Vexil

  15. Offline

    Jbitters3

  16. Offline

    Vexil

    That is really weird. Try creating a notepad to backup your plugin.yml, and delete the one in eclipse and try typing it like this:
    Code:java
    1. name: Name
    2. main: your.package.mainclass (case sensitive)
    3. author(s): [Author(s)]
    4. depend: [Essentials, Vault, Example]
    5. version: 1.0
    6. commands:
    7. [1234]command:
    8. [12345678]description: desc
    9. /* For the [1234] and [12345678] put how many spaces are inbetween the brackets. Dont use tabs, and do not copy and paste things into the plugin.yml. also, click on the last line after you type it and check if there are spaces after the last line and delete them.*/

    if that does not work, I really don't know what is wrong. everything looks about right.
     
  17. Offline

    psanker

    Lovely thing everyone should have is a text editor that has direct tab to space support or regex text search & replacement. Because YAML is a pain in the neck.
     
  18. Offline

    Techy4198

    yea that happens, there is no way to fix it, you just have to click export again and it works
     
  19. Offline

    Chiller

    Techy4198 To fix it you just refresh your project and boom works.
     
  20. Offline

    Techy4198

    I do. I have notepad++ which supports that, also a nice feature is that you can open all your yaml files at once, go into replace window, turn on the 'extended' option, set it to replace \t with 4 spaces, then hit 'replace all in all opened documents' and bam yer yaml be fixed

    how u refresh the project? I don't see a button for that. is eclipse juno outdated?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
  21. Offline

    Chiller

    Either right click on the project and refresh or click the project and press f5
     
  22. Offline

    Techy4198

    spacing is not important in yaml. but indentation is. for example
    Code:
    name: x
    version: 1.2.3
    commands:
        command1:
            description: xxx
            usage: /xxx
    and
    Code:
    name: x
    version: 1.2.3
    commands:
      command1:
                description: xxx
                usage: /xxx
    will both work. does that make sense? probably not :p but anyway that's always been the case for me at least.
    i'm guessing this whole '4 spaces instead of each tab' thing is just standard practice for making them easy to read but it should still work with 3, 5, or even 15 spaces for each tab.
     
  23. Offline

    mfran2016

    maybe it might be because you are missing the usage section of the command
    Code:
    commands:
      command:
        usage: /<command>
        description: some description
     
  24. Offline

    Chiller

    Techy4198 Its not the indentation, its whether or not you use tabs or spaces, you have to use spaces with yaml.
     
  25. Offline

    Techy4198

    I know what you mean but im just saying you can use any number of spaces instead of tabs, as long as 'command1' stays more indented than 'commands', 'description' stays more indented than 'command1', etc.

    um nope... just tried that and eclipse froze, so I killed it, tried again and my pc almost crashed. I think I might need to redownload eclipse :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
  26. Offline

    Chiller

  27. Offline

    JPG2000

    Chiller You think thats funny? Today I actually copied my main class into 25 other classes. Eclipse was so glitchy! After retarting my computer it put random letters from my main into the other classes. Thats when you switch to NetBeans D:
     
  28. Offline

    Chiller

    Why did you need to copy your main class into 25 other classes???
     
  29. Offline

    JPG2000

    Chiller I didnt! It glitched! D:
     
  30. Offline

    Techy4198

    JPG2000 what version of eclipse u using? I use juno and it aint ever glitched on me
     
Thread Status:
Not open for further replies.

Share This Page