Solved invalid plugin.yml

Discussion in 'Spigot Plugin Development' started by carefreemiau, Jun 8, 2017.

  1. Error : Could not load 'plugins\movement.jar' in folder 'plugins'

    i have tried some ways like put "plugin.yml" at the same level of src,
    checked that there was no TAB in it,
    and checked .jar contain the .yml
    but the error was still existed
    plugin.yml
    擷取1.PNG
    My code
    擷取2.PNG [/SPOILER]
    [/SPOILER
    [21:52:14] [Server thread/INFO]: Starting minecraft server version 1.11.2
    [21:52:14] [Server thread/INFO]: Loading properties
    [21:52:14] [Server thread/INFO]: Default game type: SURVIVAL
    [21:52:14] [Server thread/INFO]: Generating keypair
    [21:52:14] [Server thread/INFO]: Starting Minecraft server on *:25565
    [21:52:14] [Server thread/INFO]: Using default channel type
    [21:52:14] [Server thread/INFO]: This server is running CraftBukkit version git-Bukkit-6e3cec8 (MC: 1.11.2) (Implementing API version 1.11.2-R0.1-SNAPSHOT)
    [21:52:14] [Server thread/ERROR]: Could not load 'plugins\movement.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
    at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:160) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.bukkit.craftbukkit.v1_11_R1.CraftServer.loadPlugins(CraftServer.java:298) [craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.bukkit.craftbukkit.v1_11_R1.CraftServer.<init>(CraftServer.java:260) [craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at net.minecraft.server.v1_11_R1.PlayerList.<init>(PlayerList.java:73) [craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at net.minecraft.server.v1_11_R1.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at net.minecraft.server.v1_11_R1.DedicatedServer.init(DedicatedServer.java:185) [craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:521) [craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_40]
    Caused by: org.yaml.snakeyaml.scanner.ScannerException: mapping values are not allowed here
    in 'reader', line 4, column 9:
    commands:
    ^

    at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.java:871) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:360) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.yaml.snakeyaml.scanner.ScannerImpl.peekToken(ScannerImpl.java:249) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.yaml.snakeyaml.parser.ParserImpl$ParseDocumentEnd.produce(ParserImpl.java:252) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:157) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.yaml.snakeyaml.parser.ParserImpl.getEvent(ParserImpl.java:167) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:124) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:120) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:450) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.yaml.snakeyaml.Yaml.load(Yaml.java:381) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:232) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:155) ~[craftbukkit-1.11.2.jar:git-Bukkit-6e3cec8]
    ... 8 more
    [21:52:14] [Server thread/INFO]: Preparing level "world"
    [21:52:15] [Server thread/INFO]: Preparing start region for level 0 (Seed: -4549472139381301412)
    [21:52:16] [Server thread/INFO]: Preparing spawn area: 15%
    [21:52:17] [Server thread/INFO]: Preparing spawn area: 62%
    [21:52:17] [Server thread/INFO]: Preparing start region for level 1 (Seed: -4549472139381301412)
    [21:52:18] [Server thread/INFO]: Preparing spawn area: 50%
    [21:52:19] [Server thread/INFO]: Preparing start region for level 2 (Seed: -4549472139381301412)
    [21:52:20] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [21:52:20] [Server thread/INFO]: Done (5.365s)! For help, type "help" or "?"

    ]
     
  2. can i see the plugin.yml
     
  3. If you click his spoiler you can.
    Don't make indentations after the commands: line,
    I don't believe you can do that.

    Try just,
    commands:
    <command>:
    description:
    <command>:
    description:
     
    • Like Like x 1
  4. ScarabCoder

    ScarabCoder Retired Resource Staff
    Retired

    Commands are only one level. You don't define the args in plugin.yml.
     
    • Like Like x 1
  5. whats the "movement"?
     
    • Like Like x 1
  6. Mas

    Mas

    You need spaces between your keys and values in the plugin.yml. So "name: movement" not "name:movement"
     
    • Like Like x 1
  7. You do not put arguments of commands into plugin.yml, just the main command. Also, I think putting under the command 'Usage: /<command>' is also required if I'm not mistaken.
     
    • Like Like x 2
  8. Mas

    Mas

    None of the command options such as descrption or usage are actually required.
     
    • Like Like x 3
  9. Thanks ! It works!!
     
    • Like Like x 1
  10. Oh ok, thanks. Wasn't sure about that one. :D