Skip to content

Commit

Permalink
fix tsc & use prepare for now
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Nov 4, 2023
1 parent b9a2813 commit f324dc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"start": "tsc && node dist/app.js",
"build": "tsc && node scripts/genTypes.mjs",
"prepublishOnly": "pnpm build",
"prepare": "pnpm build",
"lint": "eslint src/**",
"fix": "eslint src/** --fix",
"mocha_test": "mocha --reporter spec --timeout 3000 --exit",
Expand Down
6 changes: 3 additions & 3 deletions src/lib/modules/effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const entity = function (entity: Entity, serv: Server) {
} else return false
}

entity.removeEffect = (effectId, opt) => {
entity.removeEffect = (effectId, opt?) => {
clearTimeout(entity.effects[effectId].timeout)
entity.effects[effectId] = null
entity.sendRemoveEffect(effectId, opt)
Expand Down Expand Up @@ -89,7 +89,7 @@ export const server = function (serv: Server, options: Options) {
})
})
}
const chatSelect = (targets.length === 1 ? (targets[0].type === 'player' ? targets[0].username : 'entity') : 'entities')
const chatSelect = (targets.length === 1 ? (targets[0].type === 'player' ? (targets[0] as Player).username : 'entity') : 'entities')
if (params[2] === 'clear') {
if (ctx.player) ctx.player.chat('Remove all effects from ' + chatSelect + '.')
else serv.info('Remove all effects from ' + chatSelect + '.')
Expand All @@ -111,6 +111,6 @@ declare global {
"sendEffect": (effectId: any, { amplifier, duration, particles, whitelist, blacklist }?: { amplifier?: number | undefined; duration?: number | undefined; particles?: boolean | undefined; whitelist?: any; blacklist?: any[] | undefined }) => void
"sendRemoveEffect": (effectId: any, { whitelist, blacklist }?: { whitelist?: any; blacklist?: any[] | undefined }) => void
"addEffect": (effectId: any, opt?: {}) => boolean
"removeEffect": (effectId: any, opt: any) => void
removeEffect: (effectId: any, opt?: any) => void
}
}

0 comments on commit f324dc4

Please sign in to comment.