Solved Plugin.yml error?

Discussion in 'Plugin Development' started by ItsMas_, Dec 30, 2015.

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

    ItsMas_

    Hi, I am very new to making plugins, and I have been attempting to make a custom /kick plugin.

    When I run the server, I get an error about my plugin.yml. Could someone tell me what is wrong with this yml?

    The YML:
    Code:
    name: MasPunishments
    author: ItsMas_
    version: 1.0.0
    description: A punishment plugin
    main: me.ItsMas_.maspunishments.Kick
    
    commands:
      kick:
        usage:/<command> [player] [reason]
        description:Removes a player from the server
      ban:
        usage:/<command> [player] [reason]
        description:Bans a player from the server
    
    permissions:
      maspunish.s1:
        description:Gives access to /kick
        default:op
    
    The Error:
    Code:
    [11:45:18 ERROR]: Could not load 'plugins\MasPunishments.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: commands are of wrong type
      at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:946) ~[craftbukkit.jar:git-Bukkit-18fbb24]
      at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:232) ~[craftbukkit.jar:git-Bukkit-18fbb24]
      at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:157) ~[craftbukkit.jar:git-Bukkit-18fbb24]
      at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [craftbukkit.jar:git-Bukkit-18fbb24]
      at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:289) [craftbukkit.jar:git-Bukkit-18fbb24]
      at org.bukkit.craftbukkit.v1_8_R3.CraftServer.<init>(CraftServer.java:251) [craftbukkit.jar:git-Bukkit-18fbb24]
      at net.minecraft.server.v1_8_R3.PlayerList.<init>(PlayerList.java:69) [craftbukkit.jar:git-Bukkit-18fbb24]
      at net.minecraft.server.v1_8_R3.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit.jar:git-Bukkit-18fbb24]
      at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:179) [craftbukkit.jar:git-Bukkit-18fbb24]
      at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:504) [craftbukkit.jar:git-Bukkit-18fbb24]
      at java.lang.Thread.run(Unknown Source) [?:1.8.0_65]
    Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
      at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:928) ~[craftbukkit.jar:git-Bukkit-18fbb24]
      ... 10 more
    
    Any help would be appreciated, thanks :D
     
    Last edited: Dec 30, 2015
  2. Offline

    timtower Administrator Administrator Moderator

    @ItsMas_ You are missing indentation at line 10+11+13+14+18+19
    And you need a space after the colon before the value starts.
     
  3. Offline

    ItsMas_

    I have put them in and it still doesn't work?
     
  4. Offline

    timtower Administrator Administrator Moderator

    @ItsMas_ Could you post your updated plugin.yml ?
     
  5. Offline

    ItsMas_

    When I put the indents in, the forum delete them. so just remember I have put them in.

    Code:
    name: MasPunishments
    author: ItsMas_
    version: 1.0.0
    description: A punishment plugin
    main: me.ItsMas_.maspunishments.Kick
    
    commands:
      kick:
        usage: /<command> [player] [reason]
        description:Removes a player from the server
      ban:
        usage: /<command> [player] [reason]
        description:Bans a player from the server
    
    permissions:
      maspunish.s1:
        description: Gives access to /kick
        default: op
     
    Last edited by a moderator: Dec 30, 2015
  6. Offline

    timtower Administrator Administrator Moderator

    @ItsMas_ Fixed your indentation with code blocks.
    You need a space between the : and the value, you currently don't have that.
     
  7. Offline

    ItsMas_

    Is the value the thing before the colon or after?
     
  8. Offline

    timtower Administrator Administrator Moderator

    After, before is called the key
     
  9. Offline

    ItsMas_

    Okay, just confirm this is correct?
    [​IMG]
     
  10. Offline

    timtower Administrator Administrator Moderator

  11. Offline

    ItsMas_

    Thanks, it's working now :D
     
    timtower likes this.
Thread Status:
Not open for further replies.

Share This Page