fix(plugins) basic private server variable

This commit is contained in:
gh0sTedBuddy
2024-04-07 13:44:22 +01:00
parent ebda263852
commit a3c5a832b7
2 changed files with 6 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ class EntityPlugin extends BasePlugin {
broadcast(clientId, message) {
// Broadcast the message to all connected clients
for (const [id, client] of this.#wetsock.clients) {
for (const [id, client] of this._getServer().clients) {
if (id !== clientId) {
client.send(JSON.stringify(message));
}
@@ -57,7 +57,7 @@ class EntityPlugin extends BasePlugin {
send(clientId, message) {
// Send the message to a specific client
const client = this.#wetsock.clients.get(clientId);
const client = this._getServer().clients.get(clientId);
if (client) {
client.send(JSON.stringify(message));
}