New at Coding, Need help with plugin.yml

Discussion in 'Plugin Development' started by tbrooks23, Oct 22, 2013.

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

    tbrooks23

    plugin.yml

    Code:
    main: me.tbrooks23.TestMain
    name: Test
    version: 1.0
    author: tbrooks23
    description: Displays Test!
     
    commands:
        test:
            description: Displays test!
            usage: usage: Syntax error! Perhaps you meant /<command>?

    Main:

    Code:java
    1. package me.tbrooks23;
    2.  
    3. import java.util.logging.Logger;
    4.  
    5. import org.bukkit.plugin.java.JavaPlugin;
    6. import org.bukkit.plugin.PluginDescriptionFile;
    7.  
    8. public class testmain extends JavaPlugin{
    9. public final Logger logger = Logger.getLogger("Minecraft");
    10. public static testmain plugin;
    11.  
    12. @Override
    13. public void onDisable(){
    14. PluginDescriptionFile pdfFile = this.getDescription();
    15. this.logger.info(pdfFile.getName() + " Has been Disabled!");
    16. }
    17. @Override
    18. public void onEnable(){
    19. PluginDescriptionFile pdfFile = this.getDescription();
    20. this.logger.info(pdfFile.getName() + pdfFile.getDescription() + " Has been Enabled!");
    21. }
    22.  
    23.  
    24. }


    Error:

    Code:
    [SEVERE] Could not load 'plugins/Test.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:257)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:132)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.loadPlugins(CraftServer.java:239)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.<init>(CraftServer.java:217)
        at net.minecraft.server.v1_6_R3.PlayerList.<init>(PlayerList.java:56)
        at net.minecraft.server.v1_6_R3.DedicatedPlayerList.<init>(SourceFile:11)
        at net.minecraft.server.v1_6_R3.DedicatedServer.init(DedicatedServer.java:107)
        at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:393)
        at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
    Caused by: while scanning for the next token
    found character    '\t' that cannot start any token
    in "<reader>", line 8, column 1:
            test:
        ^
     
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:358)
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:179)
        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingValue.produce(ParserImpl.java:591)
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161)
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:146)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:133)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:237)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
        at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:123)
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:106)
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:121)
        at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:480)
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:411)
        at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:188)
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:252)
        ... 8 more
    
     
  2. Offline

    thegarfish

    I believe your spacing is wrong. Try this (input your own stuff).

    Code:
    name: Siege
    main: me.thegarfish.siege.Main
    version: 0.0.1
    author: thegarfish
    prefix: Siege
     
    commands:
      Join:
        description: Join the game!
     
  3. Offline

    1Rogue Retired Staff

    Don't use tabs in yaml, use spaces. Bukkit follows a 2 space hierarchy usually:

    Code:
    main: me.tbrooks23.TestMain
    name: Test
    version: 1.0
    author: tbrooks23
    description: Displays Test!
     
    commands:
      test:
        description: Displays test!
        usage: usage: Syntax error! Perhaps you meant /<command>?
     
  4. Offline

    The_Doctor_123

    Are you new to the Bukkit API or Java itself? If new to Java, read my signature.
     
Thread Status:
Not open for further replies.

Share This Page