Skip to content

Instantly share code, notes, and snippets.

@Signifies
Created July 18, 2016 08:26
Show Gist options
  • Save Signifies/fd81bfc342ff568bac9a75916f7d001d to your computer and use it in GitHub Desktop.
Save Signifies/fd81bfc342ff568bac9a75916f7d001d to your computer and use it in GitHub Desktop.
Current code setup... Having an issue with it.
package work;
import Utilities.ChatUtils;
import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
/**
* Created by ES359 on 7/18/16.
*/
public class ChatCommandExc extends ChatUtils implements CommandExecutor {
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String args[])
{
if(!(sender instanceof Player))
{
sender.sendMessage(color("%prefix% &cConsole support not added."));
return true;
}
Player p = (Player)sender;
if(cmd.getName().equalsIgnoreCase("chat"))
{
logCommand(p, args);
if(args.length < 1)
{
p.spigot().sendMessage( new TextComponent( "Hello world" ) );
}
}
return true;
}
}
@Signifies
Copy link
Author

http://imgur.com/Mi9C899 - Stacktrace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment