From 4ade4715b9894b18ecb8a28001b11b02ac24e81f Mon Sep 17 00:00:00 2001 From: jessev14 Date: Sun, 1 Sep 2024 23:11:24 -0400 Subject: [PATCH] Update dnd5e-character-monitor.js --- scripts/dnd5e-character-monitor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/dnd5e-character-monitor.js b/scripts/dnd5e-character-monitor.js index 3302212..989d97c 100644 --- a/scripts/dnd5e-character-monitor.js +++ b/scripts/dnd5e-character-monitor.js @@ -209,6 +209,7 @@ Hooks.on('renderChatMessage', (app, [html], appData) => { Hooks.on('preUpdateActor', async (actor, diff, options, userID) => { if (actor.type !== 'character') return; if (game.system.id === 'dnd5e' && "isAdvancement" in options) return; + if (game.settings.get(moduleID, 'showToggle') && !game.settings.get(moduleID, 'cmToggle')) return; const whisper = game.settings.get(moduleID, 'showGMonly') ? game.users.filter(u => u.isGM).map(u => u.id) @@ -294,7 +295,8 @@ Hooks.on('preUpdateActor', async (actor, diff, options, userID) => { }); Hooks.on('updateActor', async (actor, diff, options, userID) => { - if (game.settings.get(moduleID, 'cmToggle') && !game.settings.get(moduleID, 'cmToggle')) return; + if (!game.settings.get(moduleID, 'monitorHP')) return; + if (game.settings.get(moduleID, 'showToggle') && !game.settings.get(moduleID, 'cmToggle')) return; if (diff.system?.attributes?.hp) { const previousData = options.dnd5e.hp