From 10b3cba5f845d6b6e9f31ba43da39204c00a41e2 Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Wed, 10 Aug 2016 20:06:40 +0200 Subject: [PATCH] add doc --- doc/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/README.md b/doc/README.md index 912a172..5ef9dd3 100644 --- a/doc/README.md +++ b/doc/README.md @@ -82,6 +82,10 @@ Returns a `Client` instance and perform login. Create a new client, if `isServer` is true then it is a server-side client, otherwise it's a client-side client. Takes a minecraft `version` as second argument. +### client.write(name, params) + +write a packet + ### client.state The internal state that is used to figure out which protocol state we are in during @@ -137,6 +141,23 @@ parameters. Check out the [minecraft-data docs](https://prismarinejs.github.io/minecraft-data/?v=1.8&d=protocol) to know the event names and data field names. + +### client.writeChannel(channel, params) + +write a packet to a plugin channel + + +### client.registerChannel(name, typeDefinition, [custom]) + +Register a channel `name` using the protodef `typeDefinition` and sending the register packet if `custom` is true. + +Start emitting channel events of the given name on the client object. + +### client.unregisterChannel(name, [custom]) + +Unregister a channel `name` and send the unregister packet if `custom` is true. + + ## Not Immediately Obvious Data Type Formats Note : almost all data formats can be understood by looking at