Error

Discussion in 'Bukkit Help' started by mrcal17, Apr 14, 2014.

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

    mrcal17

    Hey guys, so recently I wrote a bukkit plugin. So I did the plugin.yml and such and I uploaded it to my ftp. So, I reload and I run the command, it says An internal error occured while attempting to perform this command. Here is the code: http://pastebin.com/1H3QAf08
    Here's the plugin.yml: http://pastebin.com/HunaVN8f
    My plugin.yml is located in the src folder of my code!
    Please help me find a fix!
     
  2. Offline

    siyman4

    Change it from
    Code:
     public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
                    if (cmd.getName().equalsIgnoreCase("shutalert") && sender instanceof Player) {
                    Server s = (Server) sender;
                    s.broadcastMessage(ChatColor.AQUA + "[" + ChatColor.RED + "ShutAlert" + ChatColor.AQUA + "]" + ChatColor.GOLD + "Pack your bags! It's time for a server restart!");
                    }
                    return false;
            }
    to

    Code:
     public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
                    if (cmd.getName().equalsIgnoreCase("shutalert") && sender instanceof Player) {
                    Bukkit.broadcastMessage(ChatColor.AQUA + "[" + ChatColor.RED + "ShutAlert" + ChatColor.AQUA + "]" + ChatColor.GOLD + "Pack your bags! It's time for a server restart!");
                    }
                    return true;
            }
     
  3. Offline

    mrcal17

    I will try, thanks!
     
Thread Status:
Not open for further replies.

Share This Page