Super Mario 64
Bookends only appear in Big Boo's Haunt. They are spawned from bookshelves when Mario approaches one. If Mario jumps or punches it, he will be rewarded a Blue Coin. If it attacks Mario, he will lose two health wedges and no reward will be received. It will also disappear if it hits anything.
Mario Party 8
Bookends are seen hovering in the background in King Boo's Haunted Hideaway.