fCraft.ModerationCommands.FreezeIfAllowed C# (CSharp) Method

FreezeIfAllowed() private static method

private static FreezeIfAllowed ( Player player, PlayerInfo targetInfo ) : void
player Player
targetInfo PlayerInfo
return void
        private static void FreezeIfAllowed( Player player, PlayerInfo targetInfo )
        {
            if ( targetInfo.IsOnline && !targetInfo.IsFrozen && player.Can( Permission.Freeze, targetInfo.Rank ) ) {
                try {
                    targetInfo.Freeze( player, true, true );
                    player.Message( "Player {0}&S has been frozen while you retry.", targetInfo.ClassyName );
                } catch ( PlayerOpException ) { }
            }
        }