Solved Bukkit Plugin: Programming Error

Discussion in 'Plugin Development' started by Bostrot, Apr 18, 2014.

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

    Bostrot

    Hi! I have a little problem if I start my test plugin: Caused by: org.yaml.snakeyaml.scanner.ScannerException: null; mapping values are not allowed here
    What does it mean? What can I do that this error doesn't appears?
    Code:
    [00:45:11] [Server thread/INFO]: Starting minecraft server version 1.7.9
    [00:45:11] [Server thread/INFO]: Loading properties
    [00:45:11] [Server thread/INFO]: Default game type: SURVIVAL
    [00:45:11] [Server thread/INFO]: Generating keypair
    [00:45:12] [Server thread/INFO]: Starting Minecraft server on *:25565
    [00:45:12] [Server thread/INFO]: This server is running CraftBukkit version git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks (MC: 1.7.9) (Implementing API version 1.7.9-R0.1-SNAPSHOT)
    [00:45:12] [Server thread/ERROR]: Could not load 'plugins\MP.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:160) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugins(CraftServer.java:357) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.bukkit.craftbukkit.v1_7_R3.CraftServer.<init>(CraftServer.java:319) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at net.minecraft.server.v1_7_R3.PlayerList.<init>(PlayerList.java:68) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at net.minecraft.server.v1_7_R3.DedicatedPlayerList.<init>(SourceFile:14) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:126) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:436) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
    Caused by: org.yaml.snakeyaml.scanner.ScannerException: null; mapping values are not allowed here
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.java:733) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:305) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:179) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:563) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:146) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:237) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:123) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:106) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:121) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:480) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:411) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:189) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:155) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        ... 8 more
    [00:45:12] [Server thread/INFO]: Preparing level "world"
    [00:45:12] [Server thread/INFO]: Preparing start region for level 0 (Seed: 8766946130735426951)
    [00:45:12] [Thread-7/INFO]: ----- Bukkit Auto Updater -----
    [00:45:12] [Thread-7/INFO]: It appears that you're running a Development Build, when you've specified in bukkit.yml that you prefer to run Recommended Builds.
    [00:45:12] [Thread-7/INFO]: If you would like to be kept informed about new Development Build releases, it is recommended that you change 'preferred-channel' in your bukkit.yml to 'dev'.
    [00:45:12] [Thread-7/INFO]: With that set, you will be told whenever a new version is available for download, so that you can always keep up to date and secure with the latest fixes.
    [00:45:12] [Thread-7/INFO]: If you would like to disable this warning, simply set 'suggest-channels' to false in bukkit.yml.
    [00:45:12] [Thread-7/INFO]: ----- ------------------- -----
    [00:45:13] [Server thread/INFO]: Preparing start region for level 1 (Seed: -2055781999118114877)
    [00:45:14] [Server thread/INFO]: Preparing start region for level 2 (Seed: -2055781999118114877)
    [00:45:14] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [00:45:14] [Server thread/INFO]: Done (2,065s)! For help, type "help" or "?"
    
    My main class is here:
    http://pastebin.com/Z8rtHhbG
    Please help me!
     
  2. Offline

    Xenira

    Hi, could you please upload your plugin.yml?

    MfG Xenira
     
  3. Offline

    Bostrot

    Hi here is my plugin.yml:
    Code:
    name: MultiPlugin
    version: 1.0
    author: Eric
    main: com.eric.multiplugin.mp
    commands:
      usage: /notch
        description: Who is Notch?
     
  4. Offline

    theCodeBro

    Try this:
    Code:
    name: MultiPlugin
    version: 1.0
    author: Eric
    main: com.eric.multiplugin.mp
    commands:
    notch:
        description: Who is Notch?
     
    TigerHix likes this.
  5. Offline

    Xenira

    theCodeBro i think, you need to put two spaces infront of "notch" because its under commands in the hirachie
    Code:
    name: MultiPlugin
    version: 1.0
    author: Eric
    main: com.eric.multiplugin.mp
    commands:
      notch:
        usage: /notch
        description: Who is Notch?
     
    Jhtzb likes this.
  6. Offline

    Bostrot

    No that didn't work. But a new error comes up if I start it now:
    Code:
    [18:24:34] [Server thread/INFO]: Starting minecraft server version 1.7.9
    [18:24:34] [Server thread/INFO]: Loading properties
    [18:24:34] [Server thread/INFO]: Default game type: SURVIVAL
    [18:24:34] [Server thread/INFO]: Generating keypair
    [18:24:34] [Server thread/INFO]: Starting Minecraft server on *:25565
    [18:24:34] [Server thread/INFO]: This server is running CraftBukkit version git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks (MC: 1.7.9) (Implementing API version 1.7.9-R0.1-SNAPSHOT)
    [18:24:34] [Server thread/ERROR]: Could not load 'plugins\MP.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: Cannot find main class `com.eric.multiplugin.mp'
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:42) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:127) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:328) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugins(CraftServer.java:357) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.bukkit.craftbukkit.v1_7_R3.CraftServer.<init>(CraftServer.java:319) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at net.minecraft.server.v1_7_R3.PlayerList.<init>(PlayerList.java:68) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at net.minecraft.server.v1_7_R3.DedicatedPlayerList.<init>(SourceFile:14) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:126) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:436) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
    Caused by: java.lang.ClassNotFoundException: com.eric.multiplugin.mp
        at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_51]
        at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_51]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_51]
        at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.7.0_51]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:77) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_51]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_51]
        at java.lang.Class.forName0(Native Method) ~[?:1.7.0_51]
        at java.lang.Class.forName(Unknown Source) ~[?:1.7.0_51]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:40) ~[bukkit_lib.jar:git-Bukkit-1.7.2-R0.3-56-g3779cff-b3072jnks]
        ... 10 more
    [18:24:34] [Server thread/INFO]: Preparing level "world"
    [18:24:35] [Server thread/INFO]: Preparing start region for level 0 (Seed: 8766946130735426951)
    [18:24:35] [Thread-7/INFO]: ----- Bukkit Auto Updater -----
    [18:24:35] [Thread-7/INFO]: It appears that you're running a Development Build, when you've specified in bukkit.yml that you prefer to run Recommended Builds.
    [18:24:35] [Thread-7/INFO]: If you would like to be kept informed about new Development Build releases, it is recommended that you change 'preferred-channel' in your bukkit.yml to 'dev'.
    [18:24:35] [Thread-7/INFO]: With that set, you will be told whenever a new version is available for download, so that you can always keep up to date and secure with the latest fixes.
    [18:24:35] [Thread-7/INFO]: If you would like to disable this warning, simply set 'suggest-channels' to false in bukkit.yml.
    [18:24:35] [Thread-7/INFO]: ----- ------------------- -----
    [18:24:35] [Server thread/INFO]: Preparing start region for level 1 (Seed: -2055781999118114877)
    [18:24:36] [Server thread/INFO]: Preparing start region for level 2 (Seed: -2055781999118114877)
    [18:24:36] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [18:24:36] [Server thread/INFO]: Done (1,974s)! For help, type "help" or "?"
     
  7. Code:java
    1. name: MultiPlugin
    2. version: 1.0
    3. author: Eric
    4. main: com.eric.multiplugin.<YOUR MAIN CLASS NAME>
    5. commands:
    6. notch:
    7. usage: /notch
    8. description: Who is Notch?
     
  8. Offline

    Bostrot

    My main class is mp.java and I wrote com.eric.multiplugin.mp but the same error occurred.
     
  9. Can you send me your .jar?
     
  10. Offline

    Bostrot

  11. You didn't save your package and your class
     
  12. Offline

    Bostrot

    I thought I saved it... Can you describe me another time how I can save this
     
  13. Offline

    Bostrot

Thread Status:
Not open for further replies.

Share This Page