plugin.yml not loading?

Discussion in 'Plugin Development' started by gaz1812, May 12, 2014.

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

    gaz1812

    Hi,

    I've tried looking into finding what is wrong with my plugin.yml and I can't seem to find out.

    Code:
    name: ChatHelp
    version: 1.0
    author: Gaz1812
    main: me.gaz1812.ChatHelp.ChatHelp
    description: Provides helpful commands to keep your chat clean!
    commands:
      chatclear:
          description: Clear the chat
          permission: ch.clear
          permission-message: §4Error: You can't do this.
          aliases: [cc]
      chatlock:
          description: Lock the chat
          permission: ch.lock
          permission-message: §4Error: You can't do this.
          aliases: [cl]
      staffchat:
          description: Private Staff Chat 
          permission: ch.staff
          permissions-message: §4Error: You can't do this.
          aliases: [ch]
     
  2. Offline

    Konkz

    What is the error? I think it may be because of §, but I'm not sure - I never do plugin.yml's to this depth.
     
  3. Offline

    gaz1812

    Thanks for the reply, I'll try it without the §

    The error I'm getting is:
    [Server] INFO org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
    [Server] ERROR Could not load 'plugins/ChatHelp.jar' in folder 'plugins'
     
  4. Offline

    ZodiacTheories

    gaz1812

    Try this:

    Code:
    name: ChatHelp
    version: 1.0
    author: Gaz1812
    main: me.gaz1812.ChatHelp.ChatHelp
    description: Provides helpful commands to keep your chat clean!
    commands:
      chatclear:
          description: Clear the chat
          permission: ch.clear
          permission-message: §4Error You can't do this
          aliases: [cc]
      chatlock:
          description: Lock the chat
          permission: ch.lock
          permission-message: §4Error You can't do this
          aliases: [cl]
      staffchat:
          description: Private Staff Chat
          permission: ch.staff
          permission-message: §4 You can't do this
          aliases: [ch]
    
    I think it is the colons.
     
  5. Offline

    Konkz

    Colons* - I did not even notice them, good job Konkz! :p
     
  6. Offline

    ZodiacTheories

    Konkz

    Good job Konkz?!?! :D :p

    EDIT: And oh yeah, forgot what colons were for a sec, so I just put semi-colon :p
     
  7. Offline

    gaz1812

    Konkz ZodiacTheories I've tried that but now it shows:
    12.05 11:50:30 [Server] INFO org.bukkit.plugin.InvalidPluginException: Cannot find main class `me.gaz1812.ChatHelp.ChatHelp'
    12.05 11:50:30 [Server] ERROR Could not load 'plugins/ChatHelp.jar' in folder 'plugins'

    My class files are: [​IMG]

    Code:
    package me.gaz1812.ChatHelp;
     
  8. Offline

    ZodiacTheories

    gaz1812

    Is Chat your main class?
     
  9. Offline

    gaz1812

  10. Offline

    ZodiacTheories

    gaz1812

    Try this then:

    Code:
    name: ChatHelp
    version: 1.0
    author: Gaz1812
    main: me.gaz1812.ChatHelp.Chat
    description: Provides helpful commands to keep your chat clean!
    commands:
      chatclear:
          description: Clear the chat
          permission: ch.clear
          permission-message: §4Error You can't do this
          aliases: [cc]
      chatlock:
          description: Lock the chat
          permission: ch.lock
          permission-message: §4Error You can't do this
          aliases: [cl]
      staffchat:
          description: Private Staff Chat
          permission: ch.staff
          permission-message: §4Error You can't do this
          aliases: [ch]
    
     
  11. Offline

    gaz1812


    ZodiacTheories Now receiving the error: 12.05 12:01:54 [Server] INFO org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
    12.05 12:01:54 [Server] ERROR Could not load 'plugins/ChatHelp.jar' in folder 'plugins'
     
  12. Offline

    ZodiacTheories

    gaz1812

    Hmm, it should work, post your code please?
     
  13. Offline

    gaz1812


    ZodiacTheories I tried removing the § from the plugin.yml and this is what I got in the console:

    12.05 12:05:02 [Server] INFO at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:40) ~[spigotbuild1387.jar:git-Spigot-1387]
    12.05 12:05:02 [Server] INFO at java.lang.Class.forName(Class.java:270) ~[?:1.7.0_55]
    12.05 12:05:02 [Server] INFO at java.lang.Class.forName0(Native Method) ~[?:1.7.0_55]
    12.05 12:05:02 [Server] INFO at me.gaz1812.ChatHelp.Chat.<clinit>(Chat.java:10) ~[?:?]
    12.05 12:05:02 [Server] INFO at me.gaz1812.ChatHelp.Chat.<init>(Chat.java:7) ~[?:?]
    12.05 12:05:02 [Server] INFO at org.bukkit.plugin.java.JavaPlugin.<init>
     
  14. Offline

    ZodiacTheories

    gaz1812

    No, like the Java please
     
  15. Offline

    gaz1812

  16. Offline

    ZodiacTheories

    gaz1812

    Using any external APIs?
     
  17. Offline

    gaz1812

  18. Offline

    TheHandfish

    It's really itchy about spacing, by the way. For each child statement, try using two spaces.

    Code:text
    1. name: ChatHelp
    2. version: 1.0
    3. author: Gaz1812
    4. main: me.gaz1812.ChatHelp.ChatHelp
    5. description: Provides helpful commands to keep your chat clean!
    6. commands:
    7. chatclear:
    8. description: Clear the chat
    9. permission: ch.clear
    10. permission-message: §4Error: You can't do this.
    11. aliases: [cc]
    12. chatlock:
    13. description: Lock the chat
    14. permission: ch.lock
    15. permission-message: §4Error: You can't do this.
    16. aliases: [cl]
    17. staffchat:
    18. description: Private Staff Chat
    19. permission: ch.staff
    20. permissions-message: §4Error: You can't do this.
    21. aliases: [ch]
    22.  
     
  19. Offline

    ZodiacTheories

    gaz1812

    How did you import ChatComs then?
     
  20. Offline

    gaz1812

    ZodiacTheories I've got it as an extra class file. I'm quite new to this.

    TheHandfish Thanks for the tip. I've also tried that and it still didn't seem to fix anything :/

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

    TheHandfish

    Can you indicate where line 10 and seven are in the files, relative to the posted code?
     
  22. Offline

    Konkz

    Remove the ! from description. I think that is causing it as it's invalid desc. :S
    Such confused, many wow.

    EDIT: Herp, derp. I refreshed the page ;3
     
  23. Offline

    gaz1812

    Any fix then?

    Any fix then? Konkz TheHandfish ZodiacTheories

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

    TheHandfish

    gaz1812
     
    ZodiacTheories likes this.
  25. Offline

    gaz1812

  26. Offline

    TheHandfish

    gaz1812:

    Try using:

    Code:text
    1. public static Main plugin;
    2.  

    Instead of "public static Chat ins = new Chat();"
    If that doesn't work, add:
    Code:text
    1. plugin = this;

    To your onEnable method.

    Also, your complete Chat file would be helpful.
     
  27. Offline

    ZodiacTheories

    TheHandfish gaz1812


    No no no no

    Don't do
    Code:java
    1. public static Main plugin;


    Create an instance of your class, not doing
    Code:java
    1. public static Chat ins = new Chat();
     
  28. Offline

    TheHandfish

  29. Offline

    ZodiacTheories

    TheHandfish

    It demonstrates poor understanding of Java
     
  30. Offline

    TheHandfish

Thread Status:
Not open for further replies.

Share This Page