Solved [Help me please]Wrong commands type

Discussion in 'Plugin Help/Development/Requests' started by daandegroot123, May 28, 2015.

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

    daandegroot123

    I've got a problem with my self-made plugin :( This is the log
    [20:14:59] [Server thread/INFO]: Starting minecraft server version 1.8
    [20:14:59] [Server thread/INFO]: Loading properties
    [20:14:59] [Server thread/INFO]: Default game type: SURVIVAL
    [20:14:59] [Server thread/INFO]: Generating keypair
    [20:14:59] [Server thread/INFO]: Starting Minecraft server on *:25565
    [20:15:00] [Server thread/INFO]: This server is running CraftBukkit version git-Bukkit-33d5de3 (MC: 1.8) (Implementing API version 1.8-R0.1-SNAPSHOT)
    [20:15:00] [Server thread/ERROR]: Could not load 'plugins\Test.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: commands are of wrong type
    at org.bukkit.plugin.PluginDescriptionFile.loadMap(PluginDescriptionFile.java:946) ~[craftbukkit-1.8-R0.1-SNAPSHOT-latest.jar:git-Bukkit-33d5de3]
    at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.java:232) ~[craftbukkit-1.8-R0.1-SNAPSHOT-latest.jar:git-Bukkit-33d5de3]
    at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:157) ~[craftbukkit-1.8-R0.1-SNAPSHOT-latest.jar:git-Bukkit-33d5de3]
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [craftbukkit-1.8-R0.1-SNAPSHOT-latest.jar:git-Bukkit-33d5de3]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.java:288) [craftbukkit-1.8-R0.1-SNAPSHOT-latest.jar:git-Bukkit-33d5de3]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.<init>(CraftServer.java:250) [craftbukkit-1.8-R0.1-SNAPSHOT-latest.jar:git-Bukkit-33d5de3]
    at net.minecraft.server.v1_8_R1.PlayerList.<init>(PlayerList.java:69) [craftbukkit-1.8-R0.1-SNAPSHOT-latest.jar:git-Bukkit-33d5de3]
    at net.minecraft.server.v1_8_R1.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit-1.8-R0.1-SNAPSHOT-latest.jar:git-Bukkit-33d5de3]
    at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:133) [craftbukkit-1.8-R0.1-SNAPSHOT-latest.jar:git-Bukkit-33d5de3]
    at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:484) [craftbukkit-1.8-R0.1-SNAPSHOT-latest.jar:git-Bukkit-33d5de3]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]
    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-1.8-R0.1-SNAPSHOT-latest.jar:git-Bukkit-33d5de3]
    ... 10 more
    [20:15:00] [Server thread/INFO]: Preparing level "world"
    [20:15:00] [Server thread/INFO]: Preparing start region for level 0 (Seed: 5081725931656000896)
    [20:15:01] [Server thread/INFO]: Preparing start region for level 1 (Seed: 5081725931656000896)
    [20:15:02] [Server thread/INFO]: Preparing spawn area: 99%
    [20:15:02] [Server thread/INFO]: Preparing start region for level 2 (Seed: 5081725931656000896)
    [20:15:02] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [20:15:02] [Server thread/INFO]: Done (2,148s)! For help, type "help" or "?"
    [20:15:04] [Server thread/INFO]: Stopping the server
    [20:15:04] [Server thread/INFO]: Stopping server
    [20:15:04] [Server thread/INFO]: Saving players
    [20:15:04] [Server thread/INFO]: Saving worlds
    [20:15:04] [Server thread/INFO]: Saving chunks for level 'world'/Overworld
    [20:15:04] [Server thread/INFO]: Saving chunks for level 'world_nether'/Nether
    [20:15:04] [Server thread/INFO]: Saving chunks for level 'world_the_end'/The End

    This is my Main

    package me.daandegroot123.test;

    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.java.JavaPlugin;


    public class Main extends JavaPlugin{

    @Override
    public void onEnable(){
    getLogger().info("Mijn eerste plugin staat nu aan!");
    }

    @Override
    public void onDisable(){
    getLogger().info("Mijn eerste plugin gaat nu uit");
    }

    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
    if(cmd.getName().equalsIgnoreCase("pannenkoek")){
    Player player = (Player) sender;
    player.sendMessage(ChatColor.GREEN + "Hey jij bent nu een officiƫle pannenkoek");
    }
    return false;
    }
    }


    This my Plugin.yml

    name: Test
    author: daandegroot123
    version: 1.0
    description: Laat een speler /pannenkoek doen
    main: me.daandegroot123.test.Main
    commands:
    pannenkoek:
    description: PANNENKOEK!
    usage: /pannenkoek
     
  2. Offline

    Agentleader1

    First, put everything in code and spoilers please.


    //Edit: commands are incorrectly declared in the plugin.yml
     
  3. Offline

    daandegroot123

    I'll do the next time sorry. But what do need to change?
     
  4. Offline

    Agentleader1

    @daandegroot123 Actually, I'm not too sure now, but I notice some issues with Description. You have 2 "Description" and they probably need to be in ' '
     
  5. Offline

    daandegroot123

    Where ? In Main if i change i get a error ? Futher is see no "
     
  6. Offline

    Agentleader1

    @daandegroot123 Nevermind, it's kinda hard to look at the information you provided when it's in that font. I kinda need to see it in a code.
     
  7. Offline

    bwfcwalshy Retired Staff

  8. Offline

    daandegroot123

    Code:
    name: Test
    author: daandegroot123
    version: 1.0
    description: Laat een speler /pannenkoek doen
    main: me.daandegroot123.test.Main
    commands:
    pannenkoek:
    description: PANNENKOEK!
    usage: /pannenkoek
    
     
  9. Offline

    I Al Istannen

  10. Offline

    daandegroot123

    If i do that then i get another crash but then it says the plugin.yml is fault because that space
     
  11. Offline

    bwfcwalshy Retired Staff

    @daandegroot123
    Code:
    name: Test
    author: daandegroot123
    version: 1.0
    description: Laat een speler /pannenkoek doen
    main: me.daandegroot123.test.Main
    commands:
      pannenkoek:
        description: PANNENKOEK!
        usage: /pannenkoek
    If you get an error please post the stacktrace.
     
  12. Offline

    daandegroot123

    Really Really thanks man! It works fine now! Really Really thanks! :D
     
Thread Status:
Not open for further replies.

Share This Page