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:
Hornwitser committed 2023-11-28 14:28:22 +01:00
1 parent b9c3458cc2
commit e3e5867d60
5 files changed
+30 -20

No files matched your search

+6
View File
@@ -4,6 +4,7 @@
*/
import * as libHelpers from "./helpers";
import type { PluginConfigGroup } from "./config";
import type PlayerStats from "./PlayerStats";
// TODO Add proper typing for plugins
/* Used to define the export of info.ts from plugins */
@@ -54,6 +55,11 @@ export interface PlayerEvent {
* or "server_quit" if the server exits while the player is online.
*/
reason?: string;
/**
* Statistics recorded for this player on the instance this event
* originated from.
*/
stats: PlayerStats,
}
/**