mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 07:24:52 +09:00
Fix PlayerEvent being completely broken
Fix the name being passed as the type when deserialising the event, the stats being missing, and incorrect parameters passed to plugins.
This commit is contained in:
1 parent
b9c3458cc2
commit
e3e5867d60
5 files changed
+30
-20
No files matched your search
@@ -289,11 +289,12 @@ export default class HostConnection extends BaseConnection {
|
||||
user.recalculatePlayerStats();
|
||||
this._controller.userUpdated(user);
|
||||
|
||||
let instance = this._controller.instances!.get(instanceId);
|
||||
let instance = this._controller.instances!.get(instanceId)!;
|
||||
await lib.invokeHook(this._controller.plugins, "onPlayerEvent", instance, {
|
||||
type: event.type,
|
||||
name: event.name,
|
||||
reason: event.reason,
|
||||
stats: event.stats,
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user