diff --git a/src/lib/database/properties.ts b/src/lib/database/properties.ts index 6c34efb6..ace32090 100644 --- a/src/lib/database/properties.ts +++ b/src/lib/database/properties.ts @@ -61,27 +61,6 @@ export class LongDynamicProperty { return JSON.parse(metadata.value || defaultValue) as unknown } - static getJob(propertyId: string, defaultValue = '{}', onDone: (value: unknown) => void) { - const metadata = this.getMetadata(propertyId) - if (!metadata.value) { - metadata.value = '' - system.runJob( - (function* longDynamicPropertyLoader() { - for (let i = 0; i < metadata.length; i++) { - yield - if (!LongDynamicProperty.getProperty(propertyId, metadata, i)) { - return console.error( - `Table ${propertyId}, unable to load entries ${metadata.length - 1 - i} (${i + 1}/${metadata.length})`, - ) - } - } - // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing - onDone(JSON.parse(metadata.value || defaultValue) as unknown) - })(), - ) - } - } - static set(propertyId: string, value: string) { const strings = value.match(DatabaseUtils.propertyChunkRegexp) if (!strings) throw new DatabaseError('Failed to save db: cannot split') diff --git a/src/modules/world-edit/tools/brush.ts b/src/modules/world-edit/tools/brush.ts index 7e51e135..f69f71d9 100644 --- a/src/modules/world-edit/tools/brush.ts +++ b/src/modules/world-edit/tools/brush.ts @@ -211,7 +211,8 @@ class BrushTool extends WorldEditToolBrush { WorldEditTool.intervals.push((player, slot) => { if (slot.typeId !== this.typeId && this.brushLocators.has(player.id)) { - this.brushLocators.delete(player.id) + this.brushLocators.get(player)?.remove() + this.brushLocators.delete(player) } }) }