Event Listener< EventName > ( eventName: EventName ) : MethodDecorator < ( ( ev: WorkerEvents [ EventName ] ) => any ) >
Type Parameters
EventName extends "component.spawn" | "component.despawn" | "player.checkcolor" | "player.checkmurder" | "player.checkname" | "player.checkprotect" | "player.completetask" | "player.die" | "player.usemovingplatform" | "player.murder" | "player.protect" | "player.removeprotection" | "player.reportbody" | "player.revertshapeshift" | "player.chat" | "player.quickchat" | "player.setcolor" | "player.sethat" | "player.setname" | "player.setnameplate" | "player.setpet" | "player.setrole" | "player.setskin" | "player.setstartcounter" | "player.setvisor" | "player.shapeshift" | "player.startmeeting" | "player.syncsettings" | "player.entervent" | "player.exitvent" | "player.climbladder" | "player.move" | "player.snapto" | "player.ready" | "player.join" | "player.leave" | "player.sethost" | "player.scenechange" | "player.spawn" | "gamedata.addplayer" | "gamedata.removeplayer" | "gamedata.settasks" | "meeting.castvote" | "meeting.clearvote" | "meeting.votingcomplete" | "meeting.close" | "doors.open" | "doors.close" | "system.sabotage" | "system.repair" | "decon.doors.close" | "decon.doors.open" | "decon.enter" | "decon.exit" | "hqhud.consoles.reset" | "hqhud.consoles.open" | "hqhud.consoles.close" | "hqhud.consoles.complete" | "heli.consoles.open" | "heli.consoles.reset" | "heli.consoles.close" | "heli.consoles.complete" | "o2.consoles.clear" | "o2.consoles.complete" | "medscan.joinqueue" | "medscan.leavequeue" | "movingplatform.updateplayer" | "reactor.consoles.add" | "reactor.consoles.remove" | "reactor.consoles.reset" | "security.cameras.join" | "security.cameras.leave" | "electrical.switchflip" | "room.assignroles" | "room.endgameintent" | "room.fixedupdate" | "room.gameend" | "room.gamestart" | "room.setprivacy" | "client.broadcast" | "client.leave" | "room.beforedestroy" | "room.create" | "room.destroy" | "room.selecthost" | "client.ban" | "client.connect" | "client.disconnect" | "room.beforecreate" | "worker.beforejoin" | "worker.getgamelist" | "worker.loadplugin"
Event Listener< EventName > ( eventTarget: any , eventName: EventName ) : MethodDecorator < ( ( ev: WorkerEvents [ EventName ] ) => any ) >
Type Parameters
EventName extends "component.spawn" | "component.despawn" | "player.checkcolor" | "player.checkmurder" | "player.checkname" | "player.checkprotect" | "player.completetask" | "player.die" | "player.usemovingplatform" | "player.murder" | "player.protect" | "player.removeprotection" | "player.reportbody" | "player.revertshapeshift" | "player.chat" | "player.quickchat" | "player.setcolor" | "player.sethat" | "player.setname" | "player.setnameplate" | "player.setpet" | "player.setrole" | "player.setskin" | "player.setstartcounter" | "player.setvisor" | "player.shapeshift" | "player.startmeeting" | "player.syncsettings" | "player.entervent" | "player.exitvent" | "player.climbladder" | "player.move" | "player.snapto" | "player.ready" | "player.join" | "player.leave" | "player.sethost" | "player.scenechange" | "player.spawn" | "gamedata.addplayer" | "gamedata.removeplayer" | "gamedata.settasks" | "meeting.castvote" | "meeting.clearvote" | "meeting.votingcomplete" | "meeting.close" | "doors.open" | "doors.close" | "system.sabotage" | "system.repair" | "decon.doors.close" | "decon.doors.open" | "decon.enter" | "decon.exit" | "hqhud.consoles.reset" | "hqhud.consoles.open" | "hqhud.consoles.close" | "hqhud.consoles.complete" | "heli.consoles.open" | "heli.consoles.reset" | "heli.consoles.close" | "heli.consoles.complete" | "o2.consoles.clear" | "o2.consoles.complete" | "medscan.joinqueue" | "medscan.leavequeue" | "movingplatform.updateplayer" | "reactor.consoles.add" | "reactor.consoles.remove" | "reactor.consoles.reset" | "security.cameras.join" | "security.cameras.leave" | "electrical.switchflip" | "room.assignroles" | "room.endgameintent" | "room.fixedupdate" | "room.gameend" | "room.gamestart" | "room.setprivacy" | "client.broadcast" | "client.leave" | "room.beforedestroy" | "room.create" | "room.destroy" | "room.selecthost" | "client.ban" | "client.connect" | "client.disconnect" | "room.beforecreate" | "worker.beforejoin" | "worker.getgamelist" | "worker.loadplugin"
Parameters
eventTarget: any
eventName: EventName
Event Listener( eventName: string ) : MethodDecorator < ( ( ev: any ) => any ) >
Event Listener( eventTarget: any , eventName: string ) : MethodDecorator < ( ( ev: any ) => any ) >
Parameters
eventTarget: any
eventName: string
Event Listener( ) : MethodDecorator < ( ( ev: any ) => any ) >
Event Listener( eventTarget: any ) : MethodDecorator < ( ( ev: any ) => any ) >
A decorator to attach to a method to create a listener for an event that gets emitted on the server or a room.