diff --git a/src/components/sidebar/PlayerListItem.vue b/src/components/sidebar/PlayerListItem.vue index 9c05646..9905abe 100644 --- a/src/components/sidebar/PlayerListItem.vue +++ b/src/components/sidebar/PlayerListItem.vue @@ -44,7 +44,7 @@ export default defineComponent({ setup(props) { const store = useStore(), otherWorld = computed(() => { - return store.state.configuration.grayHiddenPlayers + return store.state.components.playerMarkers?.grayHiddenPlayers && !props.player.hidden && (!store.state.currentWorld || store.state.currentWorld.name !== props.player.location.world); }), diff --git a/src/index.d.ts b/src/index.d.ts index 120bdec..da59ca8 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -280,6 +280,7 @@ interface LiveAtlasPartialComponentConfig { } interface LiveAtlasPlayerMarkerConfig { + grayHiddenPlayers: boolean; hideByDefault: boolean; layerName: string; layerPriority: number; diff --git a/src/providers/DynmapMapProvider.ts b/src/providers/DynmapMapProvider.ts index b2fe201..c56d20a 100644 --- a/src/providers/DynmapMapProvider.ts +++ b/src/providers/DynmapMapProvider.ts @@ -56,7 +56,6 @@ export default class DynmapMapProvider extends MapProvider { private static buildServerConfig(response: any): LiveAtlasServerConfig { return { - grayHiddenPlayers: response.grayplayerswhenhidden || false, defaultMap: response.defaultmap || undefined, defaultWorld: response.defaultworld || undefined, defaultZoom: response.defaultzoom || 0, @@ -172,6 +171,7 @@ export default class DynmapMapProvider extends MapProvider { case "playermarkers": components.playerMarkers = { + grayHiddenPlayers: response.grayplayerswhenhidden || false, hideByDefault: component.hidebydefault || false, layerName: component.label || "Players", layerPriority: component.layerprio || 0,