We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b3d1a3 commit b40a75aCopy full SHA for b40a75a
src/model/CitizenServer.js
@@ -321,6 +321,15 @@ class CitizenServer {
321
hasTag(tag) {
322
return this.tags.includes(tag);
323
}
324
+
325
+ /** *
326
+ * Get if the server has any player connected with the given name
327
+ * @param {string} name Player name to check
328
+ * @return {boolean} true if the server has any player connected with the given name
329
+ */
330
+ isPlayerOnline(name) {
331
+ return this.players.some((player) => player.name === name);
332
+ }
333
334
335
module.exports = CitizenServer;
0 commit comments