@minecraft/server / EntityRemoveBeforeEventSignal
Class: EntityRemoveBeforeEventSignal ​
Defined in: @minecraft/server/index.d.ts:12113
Allows registration for an event that fires when an entity is being removed from the game (for example, unloaded, or a few seconds after they are dead.)
Methods ​
subscribe() ​
subscribe(
callback): (arg0) =>void
Defined in: @minecraft/server/index.d.ts:12132
Parameters ​
callback ​
(arg0) => void
Function to call. This closure is called with restricted-execution privilege.
Returns ​
Returns a closure that can be used in subsequent unsubscribe operations. Closure that is called with restricted-execution privilege.
(arg0) => void
Remarks ​
Will call your function every time an entity is being removed from the game.
This function can't be called in restricted-execution mode.
This function can be called in early-execution mode.
unsubscribe() ​
unsubscribe(
callback):void
Defined in: @minecraft/server/index.d.ts:12145
Parameters ​
callback ​
(arg0) => void
This closure is called with restricted-execution privilege.
Returns ​
void
Remarks ​
Unsubscribes your function from subsequent calls when an entity is being removed.
This function can't be called in restricted-execution mode.
This function can be called in early-execution mode.