Check players have a server before sending

This commit is contained in:
md_5 2013-03-23 13:45:22 +11:00
parent 13f394b9a7
commit 39009d8c96

View File

@ -60,7 +60,7 @@ public class CommandSend extends Command
private void summon(ProxiedPlayer player, ServerInfo target, CommandSender sender)
{
if ( player.getServer().getInfo() != target )
if ( player.getServer() != null && player.getServer().getInfo() != target )
{
player.connect( target );
player.sendMessage( ChatColor.GOLD + "Summoned to " + target.getName() + " by " + sender.getName() );