Don't display dead players
This commit is contained in:
parent
c021c6cc19
commit
fbf2935b19
@ -187,9 +187,30 @@ public class ItemMapRenderer extends MapRenderer
|
|||||||
cursors.removeCursor(cursors.getCursor(0));
|
cursors.removeCursor(cursors.getCursor(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*for (Location point : points)
|
||||||
|
{
|
||||||
|
double mapX = (point.getX() - info.getX()) / zoom;
|
||||||
|
double mapZ = (point.getZ() - info.getZ()) / zoom;
|
||||||
|
|
||||||
|
// To make these appear at the edges of the map, just change it from 64 to something like 128 for double the map size
|
||||||
|
if (mapX > -64 && mapX < 64 && mapZ > -64 && mapZ < 64)
|
||||||
|
{
|
||||||
|
byte b0 = (byte) (int) Math.min(127, (double) (mapX * 2.0F) + 0.5D);
|
||||||
|
byte b1 = (byte) (int) Math.max(-127, (double) (mapZ * 2.0F) + 0.5D);
|
||||||
|
|
||||||
|
byte cursorType = 5; // http://i.imgur.com/wpH6PT8.png
|
||||||
|
// Those are byte 5 and 6
|
||||||
|
byte rotation = (byte) (int) ((point.getYaw() * 16D) / 360D);
|
||||||
|
|
||||||
|
MapCursor cursor = new MapCursor(b0, b1, rotation, cursorType, true);
|
||||||
|
|
||||||
|
cursors.addCursor(cursor);
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
for (Player other : Bukkit.getOnlinePlayers())
|
for (Player other : Bukkit.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
if (player.canSee(other))
|
if (player.canSee(other) && other.isValid())
|
||||||
{
|
{
|
||||||
Location l = other.getLocation();
|
Location l = other.getLocation();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user