fCraft.ChatCommands.CustomChatHandler C# (CSharp) Method

CustomChatHandler() private static method

private static CustomChatHandler ( Player player, Command cmd ) : void
player Player
cmd Command
return void
        private static void CustomChatHandler( Player player, Command cmd )
        {
            if ( player.Info.IsMuted ) {
                player.MessageMuted();
                return;
            }

            if ( player.DetectChatSpam() )
                return;

            string message = cmd.NextAll().Trim();
            if ( message.Length > 0 ) {
                if ( player.Can( Permission.UseColorCodes ) && message.Contains( "%" ) ) {
                    message = Color.ReplacePercentCodes( message );
                }
                Chat.SendCustom( player, message );
            }
        }