Add short circuit to ensure that socket events through the API can't trigger the sands update while disabled

This commit is contained in:
Eldritch-Oliver 2025-10-07 22:21:33 -06:00
parent 77d43f28b4
commit 78d02400d0

View file

@ -3,6 +3,7 @@ import { localizer } from "../utils/Localizer.mjs";
export function updateSands(payload) { export function updateSands(payload) {
if (!game.user.isActiveGM) { return }; if (!game.user.isActiveGM) { return };
if (!game.settings.get(game.system.id, `allowUpdateSandsSocket`)) { return };
// Assert payload validity // Assert payload validity
const { value, delta } = payload; const { value, delta } = payload;