*HELP* Error preventing the plugin to run on my server

Discussion in 'Spigot Plugin Development' started by xNinjo, May 21, 2016.

  1. Here's the error;
    [​IMG]
    Seems like it's not working.
    http://imgur.com/nWwffwK

    Here's my code;
    Code (Text):
    package me.ninjomcs;

    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 hpmain extends JavaPlugin {

        @Override
        public void onEnable(){
            getLogger().info("HPMain is all good and working.");
        }

        @Override
        public void onDisable(){
       

       }@Override
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[]args){
       
            if (cmd.getName().equalsIgnoreCase("faq") && sender instanceof Player){
           
                Player player = (Player) sender;
           
                player.sendMessage(ChatColor.AQUA + "Hypelex" + ChatColor.BLACK + "> " + ChatColor.GREEN + "Here are the frequently asked questions!");
                player.sendMessage(ChatColor.LIGHT_PURPLE + "Q: Are the plugins custom-coded?");
                player.sendMessage(ChatColor.BLUE + "A: Some of them are, for example this one. But most of them aren't, although we are working on getting all the plugins custom-coded.");
                player.sendMessage(" ");
                player.sendMessage(ChatColor.LIGHT_PURPLE + "Q: I found a hacker/cheater! How can I report him!?");
                player.sendMessage(ChatColor.BLUE + "A: Report them at hypelex.enjin.com, or tell a staff member that is online.");
                player.sendMessage(" ");
                player.sendMessage(ChatColor.LIGHT_PURPLE + "Q: How do I get kits?");
                player.sendMessage(ChatColor.BLUE + "A: PvP: Currently all kits are available to everyone, but we will add a economy system in a future update so you can buy kits with in-game money. TNTRun: Still in progress. Bedwars: Currently no kits. SG: Currently no kits.");
                player.sendMessage(" ");
                player.sendMessage(ChatColor.LIGHT_PURPLE + "Q: How do I get a Youtube or staff rank?");
                player.sendMessage(ChatColor.BLUE + "Register at hypelex.enjin.com, then create a thread in General Discussion named YT Application/Staff Application or something similar.");

           
       
       
            return false;

            }


        }
        }
     
    Hope someone can help me :)
     

    Attached Files:

  2. I normally would completely ignore someone impatient as you, bumping after 15 minutes... But I'm in a good mood ^^

    You are using a dependency which uses another dependency, but you haven't added that dependency to your project.

    This normally should not happend, so I've no idea what you messed up. You could use Maven instead, or if you prefer you use your current interface; build the latest Spigot jar and add that one as a library to your project.
     
  3. Sometimes, I get random errors in different places. What I do to solve it, is I just save the java file (Ctrl+S). It saves the file and refreshes it, which reveals all current errors.

    EDIT: Or maybe you don't have the package that you listed in the "package" method. Check the name of the packages that your .java file is in and update it in the file. IT IS CASE SENSITIVE!