darcros / node-minecraft-proxy

Simple Minecraft proxy written in Node.js using the node-minecraft-protocol library
MIT License
32 stars 15 forks source link

List of events and packets #4

Open fakename131 opened 3 years ago

fakename131 commented 3 years ago

Is there any list of parameters for:

  1. proxy.on,
  2. client.on, and
  3. client.write
darcros commented 3 years ago

Hi, as you may have noticed I haven't committed to this repo in a long time, that's because I'm no longer maintaining this project and I don't really recommend using it.

Anyways I gave a quick look at the code and it looks like the client object is an instance of Client from node-minecraft-protocol. You can take a look at their docs for the list of events emitted by client.on. You can find a list of all the packets in the Minecraft protocol, that you can pass to client.write, here: https://minecraft-data.prismarine.js.org/?d=protocol

As for proxy.on I should have documented the events when I wrote this package, but I didn't, and I won't do it now because I'm not maintaining this anymore. So I'll leave it to you to discover them, just look for this.emit() calls in Proxy.js.