From 31938d530a2edb82b95676b48ffa152454a96e64 Mon Sep 17 00:00:00 2001 From: James Lyne Date: Sun, 22 Aug 2021 23:04:07 +0100 Subject: [PATCH] Fix player marker updating when players layer is hidden --- DynmapCore/src/main/resources/extracted/web/js/playermarkers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DynmapCore/src/main/resources/extracted/web/js/playermarkers.js b/DynmapCore/src/main/resources/extracted/web/js/playermarkers.js index 8f5a48b4..c2a7e028 100644 --- a/DynmapCore/src/main/resources/extracted/web/js/playermarkers.js +++ b/DynmapCore/src/main/resources/extracted/web/js/playermarkers.js @@ -94,7 +94,7 @@ componentconstructors['playermarkers'] = function(dynmap, configuration) { var markerPosition = dynmap.getProjection().fromLocationToLatLng(player.location); player.marker.setLatLng(markerPosition); // Update health - if (configuration.showplayerhealth) { + if (configuration.showplayerhealth && player.healthContainer) { if (player.health !== undefined && player.armor !== undefined) { player.healthContainer.css('display','block'); player.healthBar.css('width', Math.ceil(player.health*2.5) + 'px');