Skip to content

Commit

Permalink
we: fix brush 2
Browse files Browse the repository at this point in the history
  • Loading branch information
leaftail1880 committed Nov 1, 2024
1 parent fa0f823 commit 88fd6e9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/player-move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const playerPositionCache = new WeakPlayerMap<PlayerPosition>()
jobInterval()

function jobInterval() {
system.runJob(jobPlayerPosition())
system.delay(() => system.runJob(jobPlayerPosition()))
}

function* jobPlayerPosition() {
Expand Down
12 changes: 12 additions & 0 deletions src/lib/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,15 @@ if (!__VITEST__) {
}
})
}

if (!__VITEST__) {
const lastVersionId = 'lastVersion'
if (world.getDynamicProperty(lastVersionId) !== __GIT__) {
world
.getAllPlayers()
.filter(e => is(e.id, 'techAdmin'))
.forEach(e => e.sendMessage(`§9>§f ${__GIT__}`))

world.setDynamicProperty(lastVersionId, __GIT__)
}
}
4 changes: 2 additions & 2 deletions src/modules/world-edit/lib/world-edit-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ type StorageType = Partial<Record<StorageKey, any>> & {
version: number
}

export abstract class WorldEditTool<Storage extends StorageType = StorageType> {
export abstract class WorldEditTool<Storage extends StorageType = any> {
static loreBlockRefKeys: string[] = ['blocksSet', 'replaceBlocksSet'] satisfies StorageKey[]
static tools: WorldEditTool<any>[] = []
static tools: WorldEditTool[] = []

abstract id: string
abstract name: string
Expand Down

0 comments on commit 88fd6e9

Please sign in to comment.