mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 07:33:12 +09:00
Provide reason for player leaving
Expose the reason for why a player is leaving a server in playerEvent.
This commit is contained in:
1 parent
8017497bdd
commit
db562ce6a0
5 files changed
+37
-10
No files matched your search
@@ -208,6 +208,9 @@ class BaseInstancePlugin {
|
||||
* @param {Object} event - Information about the event.
|
||||
* @param {string} event.type - Either "join" or "leave".
|
||||
* @param {string} event.name - Name of the player that joined/left.
|
||||
* @param {string=} event.reason -
|
||||
* Only present for type "leave". Reason for player leaving the
|
||||
* game, one of the possible reasons in defines.disconnect_reason.
|
||||
*/
|
||||
async onPlayerEvent(event) { }
|
||||
|
||||
@@ -500,6 +503,9 @@ class BaseMasterPlugin {
|
||||
* @param {Object} event - Information about the event.
|
||||
* @param {string} event.type - Either "join" or "leave".
|
||||
* @param {string} event.name - Name of the player that joined/left.
|
||||
* @param {string=} event.reason -
|
||||
* Only present for type "leave". Reason for player leaving the
|
||||
* game, one of the possible reasons in defines.disconnect_reason.
|
||||
*/
|
||||
async onPlayerEvent(instance, event) { }
|
||||
|
||||
|
||||
Reference in new issue
Block a user