You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/API.md
+9
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,11 @@ Called when a client connects, but before any login has happened. Takes a
89
89
90
90
Called when a client is logged in against server. Takes a `Client` parameter.
91
91
92
+
### `playerJoin` event
93
+
94
+
Emitted after a player joins and enters the PLAY protocol state and can send and recieve game packets. This is emitted after the `login` event. On 1.20.2 and above after we emit the `login` event, the player will enter a CONFIG state, as opposed to the PLAY state (where game packets can be sent), so you must instead now wait for `playerJoin`.
95
+
96
+
92
97
### `listening` event
93
98
94
99
Called when the server is listening for connections. This means that the server is ready to accept incoming connections.
@@ -261,6 +266,10 @@ Called when user authentication is resolved. Takes session data as parameter.
261
266
Called when the protocol changes state. Takes the new state and old state as
262
267
parameters.
263
268
269
+
### `playerJoin` event
270
+
271
+
Emitted after the player enters the PLAY protocol state and can send and recieve game packets
272
+
264
273
### `error` event
265
274
266
275
Called when an error occurs within the client. Takes an Error as parameter.
0 commit comments