Bukkit/CraftBukkit — pull request #1290 by desht (2013-12-09 09:58:46+00:00)
Title: [C] Fix to previous pull for Bukkit-5020

##### The Issue

Pull https://github.com/Bukkit/CraftBukkit/pull/1279 adds the firing of an EntityDamage event for item frames with an item, which is good. However, an incorrect return value is causing the event handler to be fired twice.

##### Justification for this PR

This PR ensures that only one damage event is fired when the player hits (left-clicks) an item frame

##### PR Breakdown

This PR changes the return value of EntityItemFrame#damageEntity() from false to true when the associated damage event has been cancelled. This is necessary to indicate to CraftBukkit that the damage event has been dealt with. For a detailed explanation, see my comment at https://github.com/Bukkit/CraftBukkit/pull/1279#issuecomment-30117973

##### Testing Materials

I used my ScrollingMenuSign plugin to test (and discover) this. It allows left-clicks on a map in an item frame to trigger a command, based on the selected menu item displayed on the map (see http://dev.bukkit.org/bukkit-plugins/scrollingmenusign/pages/view-types/map-views/#w-framed-maps). I noticed that a left click caused commands to be run twice. With EntityItemFrame#damageEntity() returning true, commands are only run once per click, as expected.

##### Relevant PR(s)

https://github.com/Bukkit/CraftBukkit/pull/1279