Solved Strange Error

Discussion in 'Plugin Development' started by Pokechu212, Jul 14, 2014.

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

    Pokechu212

    So I attempted to load my plugin into my server and this is the error I get:
    Code:
    [16:37:32 ERROR]: Could not load 'plugins\Tests-0.0.1-SNAPSHOT.jar' in folder 'p
    lugins'
    org.bukkit.plugin.InvalidDescriptionException: commands are of wrong type
            at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile
    .java:859) ~[craftbukkit-1.7.2-R0.4-20140316.221310-4.jar:git-Bukkit-1.7.2-R0.3-
    2-g85f5776-b3024jnks]
            at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.
    java:189) ~[craftbukkit-1.7.2-R0.4-20140316.221310-4.jar:git-Bukkit-1.7.2-R0.3-2
    -g85f5776-b3024jnks]
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPlug
    inLoader.java:155) ~[craftbukkit-1.7.2-R0.4-20140316.221310-4.jar:git-Bukkit-1.7
    .2-R0.3-2-g85f5776-b3024jnks]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:133) [craftbukkit-1.7.2-R0.4-20140316.221310-4.jar:git-Bukkit-1.7.2-R0.3-2
    -g85f5776-b3024jnks]
            at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugins(CraftServer.ja
    va:350) [craftbukkit-1.7.2-R0.4-20140316.221310-4.jar:git-Bukkit-1.7.2-R0.3-2-g8
    5f5776-b3024jnks]
            at org.bukkit.craftbukkit.v1_7_R1.CraftServer.<init>(CraftServer.java:31
    2) [craftbukkit-1.7.2-R0.4-20140316.221310-4.jar:git-Bukkit-1.7.2-R0.3-2-g85f577
    6-b3024jnks]
            at net.minecraft.server.v1_7_R1.PlayerList.<init>(PlayerList.java:63) [c
    raftbukkit-1.7.2-R0.4-20140316.221310-4.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776-b30
    24jnks]
            at net.minecraft.server.v1_7_R1.DedicatedPlayerList.<init>(SourceFile:14
    ) [craftbukkit-1.7.2-R0.4-20140316.221310-4.jar:git-Bukkit-1.7.2-R0.3-2-g85f5776
    -b3024jnks]
            at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.jav
    a:126) [craftbukkit-1.7.2-R0.4-20140316.221310-4.jar:git-Bukkit-1.7.2-R0.3-2-g85
    f5776-b3024jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java
    :424) [craftbukkit-1.7.2-R0.4-20140316.221310-4.jar:git-Bukkit-1.7.2-R0.3-2-g85f
    5776-b3024jnks]
            at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6
    17) [craftbukkit-1.7.2-R0.4-20140316.221310-4.jar:git-Bukkit-1.7.2-R0.3-2-g85f57
    76-b3024jnks]
    Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java
    .util.Map
            at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile
    .java:841) ~[craftbukkit-1.7.2-R0.4-20140316.221310-4.jar:git-Bukkit-1.7.2-R0.3-
    2-g85f5776-b3024jnks]
            ... 10 more
    As the error states, I go to my plugin.yml to look at the command description (it's just a test plugin so there is only one command):
    Code:
    commands:
            beep:
            description: Because why not.
            usage: /beep
            permission: test.beep
            permission_message: Shame on you!
    What is the error in this? I am having a lot of trouble trying to find it.
    Here is the actual command in the main class:
    Code:java
    1. @Override
    2. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    3. if (cmd.getName().equalsIgnoreCase("beep")) {
    4. sender.sendMessage("Bop!");
    5. return true;
    6. }
    7.  
    8. return false;
    9. }
     
  2. Offline

    Traks

    The YAML parser Bukkit uses requires correct indentation with spaces:
    Code:
    commands:
      something:
        description: Does something
    By the way, it should be 'permission-message' instead of 'permission_message'
     
    MCMastery likes this.
Thread Status:
Not open for further replies.

Share This Page