Help! : Error in console please read

Discussion in 'Plugin Development' started by Hectorg98, Nov 22, 2014.

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

    Hectorg98

    Hi i'm making a plugin. I get this error in console:
    Caused by: org.yaml.snakeyaml.scanner.ScannerException: null; mapping values are not allowed here

    1) If anybody knows what that is please respond
    2) Here's my code:

    Code:
    package me.Hectorg98.vurge;
     
    import java.util.logging.Logger;
     
    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.event.Listener;
    import org.bukkit.plugin.PluginDescriptionFile;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class Vurge extends JavaPlugin implements Listener {
        public final Logger logger = Logger.getLogger("Minecraft");
        public static Vurge plugin;
       
       
        @Override
        public void onDisable() {
            PluginDescriptionFile pdfFile = this.getDescription();
            this.logger.info(pdfFile.getName() + pdfFile.getVersion() + ("Has Been Disabled!"));
        }
       
        @Override
        public void onEnable() {
            PluginDescriptionFile pdfFile = this.getDescription();
            this.logger.info(pdfFile.getName() + "Version" + pdfFile.getVersion() + ("Has Been Enabled!"));{
               
               
            }
            }
           
           
        public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
            Player player = (Player) sender;
            if(commandLabel.equalsIgnoreCase("teamcreate"));
            if(args.length == 0)
                player.sendMessage(ChatColor.RED + "Not enough arguments! Correct usage: /teamcreate [YOUR IGN] [TEAM NAME]");
            if(args.length == 1);
                player.sendMessage(ChatColor.RED + "Not enough arguments! Correct usage: /teamcreate [YOUR IGN] [TEAM NAME]");
            if(args.length == 2);
                player.sendMessage(ChatColor.AQUA + "You have succesfully created the team:" + args[0]);
                return false;


    Thanks!
     
  2. Offline

    mine-care

    Player player = (Player) sender; Oh god... Please read my signature.

    public final Logger logger = Logger.getLogger("Minecraft"); Dont get the logger this way, instead use Logger logger = getLogger(); simple and easy.

    PluginDescriptionFile pdfFile = this.getDescription(); this.logger.info(pdfFile.getName() + "Version" + pdfFile.getVersion() + ("Has Been Enabled!"));{ }
    You dont need the pdfFile ect since bukit already logs the enable of each plugin.


    What is the second body after the ...("Has Been Enabled!")); { }

    Can we see the full error and possibly the full code as well?
    Thanks.
     
  3. Offline

    es359


    Just invoke the getLogger() method...
     
  4. Offline

    ChipDev

    Derp:
    Code:java
    1. if(sender instanceof Player) {
    2. }else{
    3. Player p = (Player) sender;
    4. }

    XD
     
    mine-care likes this.
  5. Offline

    Hectorg98

    mine-care all the code that I put up there is all that I have in my eclipse.

    Code:
    22.11 06:24:05 [Server] INFO Caused by: org.yaml.snakeyaml.scanner.ScannerException: null; mapping values are not allowed here
    22.11 06:24:05 [Server] INFO at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:258) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at net.minecraft.server.v1_7_R4.ServerConnection.c(SourceFile:134) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:157) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat.java:47) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:818) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:957) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:740) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at org.bukkit.Bukkit.reload(Bukkit.java:303) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.CraftServer.reload(CraftServer.java:837) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:364) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:160) ~[craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    22.11 06:24:05 [Server] INFO org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
    22.11 06:24:05 [Server] ERROR Could not load 'plugins/vurge.jar' in folder 'plugins
    This is basically the error I get, it says it cant load the plugin, and then the error on the mapping not allowed thing.

    ChipDev es359 so what are you guys suggesting to do and will this fix my console error for my plugin to be usuable?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 13, 2016
  6. Offline

    mine-care

    org.bukkit.plugin.InvalidDescriptionException
    <Edit by Moderator: Redacted bit url>
    xD

    EDIT: ChipDev hehe! you really made my day! :p

    es359 thats what i sugested on my post Sorry if i wasnt clear :( it happends a lot to me....

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Feb 11, 2017
    ChipDev likes this.
  7. Offline

    ChipDev

    [quote uid=90737861 name="mine-care" post=2899851]org.bukkit.plugin.InvalidDescriptionException
    <Edit by Moderator: Redacted bit url>
    xD

    EDIT: ChipDev hehe! you really made my day! :p[/quote]

    Made mine too!
     
    Last edited by a moderator: Feb 11, 2017
  8. Offline

    Hectorg98

    mine-care so you're saying that it's a spacing error in my plugin.yml?

    Code:
    name: Vurge
    main: me.Hectorg98.vurge.Vurge
    version: 1.0
    description: >
                Vurge
    commands:
      teamcreate:
        description: Teams: Creates a team!

    that's my plugin.yml
     
  9. Offline

    mine-care

  10. Offline

    Hectorg98

    I fixed it! Thanks :D

    Also by any case mine-care ChipDev do you know how to rename someone's name?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 13, 2016
    ChipDev likes this.
  11. Offline

    mine-care

    Hectorg98 Nice!
    About the rename, do you mean the name displyed above players head or the chat display name?
     
    ChipDev likes this.
  12. Offline

    Hectorg98

  13. Offline

    mine-care

    Hectorg98 player.setDisplayName(String name);
     
  14. Offline

    Hectorg98

    Thanks!
     
Thread Status:
Not open for further replies.

Share This Page