final FontMetrics metrics = render.getFontMetrics();
for (final org.rsbot.client.RSPlayer element : players) {
if (element == null) {
continue;
}
final RSPlayer player = new RSPlayer(ctx, element);
final Point location = ctx.calc.tileToScreen(player.getLocation(), player.getHeight() / 2);
if (!ctx.calc.pointOnScreen(location)) {
continue;
}
render.setColor(Color.RED);
render.fillRect((int) location.getX() - 1, (int) location.getY() - 1, 2, 2);
String s = player.getName() + " (" + player.getCombatLevel() + ")";
render.setColor(player.isInCombat() ? (player.isDead() ? Color.GRAY : Color.RED) : player.isMoving() ? Color.GREEN : Color.WHITE);
render.drawString(s, location.x - metrics.stringWidth(s) / 2, location.y - metrics.getHeight() / 2);
final String msg = player.getMessage();
boolean raised = false;
if (player.getAnimation() != -1 || player.getGraphic() > 0 || player.getNPCID() != -1) {
if (player.getNPCID() != -1) {
s = "(NPC: " + player.getNPCID() + " | L: " + player.getLevel() + " | A: " + player.getAnimation() + " | G: " + player.getGraphic() + ")";
} else {
s = "(A: " + player.getAnimation() + " | G: " + player.getGraphic() + ")";
}
render.drawString(s, location.x - metrics.stringWidth(s) / 2, location.y - metrics.getHeight() * 3 / 2);
raised = true;
}
if (msg != null) {