@@ -46,7 +46,7 @@ export const entity = function (entity: Entity, serv: Server) {
46
46
} else return false
47
47
}
48
48
49
- entity . removeEffect = ( effectId , opt ) => {
49
+ entity . removeEffect = ( effectId , opt ? ) => {
50
50
clearTimeout ( entity . effects [ effectId ] . timeout )
51
51
entity . effects [ effectId ] = null
52
52
entity . sendRemoveEffect ( effectId , opt )
@@ -89,7 +89,7 @@ export const server = function (serv: Server, options: Options) {
89
89
} )
90
90
} )
91
91
}
92
- const chatSelect = ( targets . length === 1 ? ( targets [ 0 ] . type === 'player' ? targets [ 0 ] . username : 'entity' ) : 'entities' )
92
+ const chatSelect = ( targets . length === 1 ? ( targets [ 0 ] . type === 'player' ? ( targets [ 0 ] as Player ) . username : 'entity' ) : 'entities' )
93
93
if ( params [ 2 ] === 'clear' ) {
94
94
if ( ctx . player ) ctx . player . chat ( 'Remove all effects from ' + chatSelect + '.' )
95
95
else serv . info ( 'Remove all effects from ' + chatSelect + '.' )
@@ -111,6 +111,6 @@ declare global {
111
111
"sendEffect" : ( effectId : any , { amplifier, duration, particles, whitelist, blacklist } ?: { amplifier ?: number | undefined ; duration ?: number | undefined ; particles ?: boolean | undefined ; whitelist ?: any ; blacklist ?: any [ ] | undefined } ) => void
112
112
"sendRemoveEffect" : ( effectId : any , { whitelist, blacklist } ?: { whitelist ?: any ; blacklist ?: any [ ] | undefined } ) => void
113
113
"addEffect" : ( effectId : any , opt ?: { } ) => boolean
114
- " removeEffect" : ( effectId : any , opt : any ) => void
114
+ removeEffect : ( effectId : any , opt ? : any ) => void
115
115
}
116
116
}
0 commit comments