Bukkit/CraftBukkit — pull request #1076 by aikar (2013-03-20 22:03:17+00:00)
Title: [C] Fix logic errors in Maps in ItemFrame sending. Fixes BUKKIT-3621

Vanilla Map in ItemFrames is incorrectly sending the map data for a
map to every player in the world, instead of only those who are in
range of the item frame. It also will execute other sections of code
9 out of 10 ticks that is unrelated to Item Frames.

This causes the server to do more than it needs to, causing pretty
significant performance loss, and is a waste of bandwidth.

This change makes the code use the correct HashSet of tracked players
instead, so it will not send the data to players who do not need it.
Additionally, it will ensure that the ItemFrame control statement
always returns true, and only the map specific parts are restricted
to 1 in 10 ticks.