function onPlayerInteract(event) {
  var player = event.player,
    clickedEntity = event.rightClicked;

  if (!store[player.name]) {
    return;
  }

  if (clickedEntity instanceof bkCow) {
    store[player.name].score++;
    scoreboard.update('cowclicker', player, store[player.name].score);

    bkBukkit.dispatchCommand(player, 'me clicked a cow!');
    sounds.uiButtonClick(clickedEntity);
    setTimeout(function() {
      sounds.entityCowHurt(clickedEntity);
    }, 200);
  }
}
**********************************************************************
## Cow Clicker Mini-Game

### How to Play

At the in-game prompt type `jsp cowclicker` to start or stop
playing. Right-Click on Cows to score points. No points for killing
cows (hint: use the same keyboard keys you'd use for opening doors).

Every time you click a cow your score increases by 1 point. Your score
is displayed in a side-bar along the right edge of of the screen.

![cow clicker](img/cowclicker.png)

### Rules
You can join and leave the Cow Clicker game at any time by typing
   `/jsp cowclicker` at the in-game prompt.
Once you leave the game, your score is reset to zero.
When you disconnect from the server, your score will be reset to zero.

### Gameplay Mechanics

This is meant as a trivially simple use of the [Bukkit Scoreboard
API][bukscore]. There are many things you'll want to consider when constructing
your own mini-game...
Is the game itself a long-lived game - that is - should players and
   scores be persisted (stored) between server restarts?  
What should happen when a player quits the server - should this also be
   understood as quitting the mini-game?
What should happen when a player who was previously playing the
   mini-game, joins the server - should they automatically resume the
   mini-game?

[bukscore]: http://jd.bukkit.org/beta/apidocs/org/bukkit/scoreboard/package-summary.html
*