fCraft.BlockDB.OnPlayerPlacedBlock C# (CSharp) Method

OnPlayerPlacedBlock() private static method

private static OnPlayerPlacedBlock ( object sender, [ e ) : void
sender object
e [
return void
        private static void OnPlayerPlacedBlock( object sender, [NotNull] PlayerPlacedBlockEventArgs e )
        {
            if ( e == null )
                throw new ArgumentNullException( "e" );
            World world = e.Map.World;
            if ( world != null && world.BlockDB.IsEnabled ) {
                BlockDBEntry newEntry = new BlockDBEntry( ( int )DateTime.UtcNow.ToUnixTime(),
                                                          e.Player.Info.ID,
                                                          e.Coords,
                                                          e.OldBlock,
                                                          e.NewBlock,
                                                          e.Context );
                world.BlockDB.AddEntry( newEntry );
            }
        }