The plugin is not intuitive at all and really hard to use for someone who doesn't know what each events do code-wise , and without a join and leave command , it doesn't help too , to be honest , you should re-work the structure ( You could take the official websocket plugin as an inspiration) , for now , the plugin is not useable for other than you .
I would suggest restarting the plugin from ground-zero and concentrating on those CAEs
On closed
Triggered when the connection is closed, either deliberately or due to an error.
On connected
Triggered when the connection is successfully established and the communication channel is now open.
On message
Triggered when a text message arrives from the server over an open connection. Use the MessageText expression to retrieve the content of the message.
---------------------------------------------------------------------
Close
Close any active connection. No more messages can be sent or will be received after closing.
Connect
Connect to the server
Send text
Send a text string to the server. This is ignored if the connection is not currently open.
---------------------------------------------------------------------
MessageText
In On message, the text content of the message just received from the server.
Examples of the uses
You could send a message as "Object|UID|X|Y"
And you wouldn't need webplayer.X/Y
That would be all the essential conditions for a game , and would largely sufficient
I'm sorry , but I gave it all what I could and I hope you can make this happen !