From fbf2935b19b5a0b48f525d427eb75f11e4c24f6f Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sat, 4 Jul 2015 09:07:14 +1200 Subject: [PATCH] Don't display dead players --- .../game/clans/clans/map/ItemMapRenderer.java | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/map/ItemMapRenderer.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/map/ItemMapRenderer.java index bc70b68fe..2a3926a6a 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/map/ItemMapRenderer.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/map/ItemMapRenderer.java @@ -187,9 +187,30 @@ public class ItemMapRenderer extends MapRenderer 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()) { - if (player.canSee(other)) + if (player.canSee(other) && other.isValid()) { Location l = other.getLocation();