mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
update README
This commit is contained in:
parent
a6ee5ca026
commit
3e7501b215
2 changed files with 36 additions and 12 deletions
47
README.md
47
README.md
|
@ -4,19 +4,23 @@ Parse and serialize minecraft packets, plus authentication and encryption.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Parses all packets and emits `packet` events with packet fields as JavaScript
|
* Parses all packets and emits events with packet fields as JavaScript
|
||||||
objects.
|
objects.
|
||||||
* Send a packet by supplying fields as a JavaScript object.
|
* Send a packet by supplying fields as a JavaScript object.
|
||||||
* Supports authenticating and logging in.
|
* Client
|
||||||
- Supports encryption (client only)
|
- Authenticating and logging in
|
||||||
- Supports online mode (client only)
|
- Encryption on and encryption off
|
||||||
- Supports offline mode
|
- Both online and offline mode
|
||||||
* Respond to keep-alive packets.
|
- Respond to keep-alive packets.
|
||||||
* Test coverage
|
- Ping a server for status
|
||||||
- encryption
|
* Server
|
||||||
- authentication/online mode
|
- Offline mode
|
||||||
- offline mode
|
- [TODO](https://github.com/superjoe30/node-minecraft-protocol/issues/13) -
|
||||||
- initialization packets
|
Encryption and online mode
|
||||||
|
- Handshake
|
||||||
|
- Keep-alive checking
|
||||||
|
- Ping status
|
||||||
|
* Robust test coverage. See Test Coverage section below.
|
||||||
* Optimized for rapidly staying up to date with Minecraft protocol updates.
|
* Optimized for rapidly staying up to date with Minecraft protocol updates.
|
||||||
|
|
||||||
## Minecraft Compatibility
|
## Minecraft Compatibility
|
||||||
|
@ -83,6 +87,27 @@ server.on('login', function(client) {
|
||||||
* Download the appropriate version of `minecraft_server.jar`.
|
* Download the appropriate version of `minecraft_server.jar`.
|
||||||
* `MC_SERVER_JAR=path/to/minecraft_server.jar MC_USERNAME=username MC_EMAIL=email@example.com MC_PASSWORD=password npm test`
|
* `MC_SERVER_JAR=path/to/minecraft_server.jar MC_USERNAME=username MC_EMAIL=email@example.com MC_PASSWORD=password npm test`
|
||||||
|
|
||||||
|
### Test Coverage
|
||||||
|
|
||||||
|
```
|
||||||
|
client
|
||||||
|
✓ pings the server (6164ms)
|
||||||
|
✓ connects successfully - online mode (2527ms)
|
||||||
|
✓ connects successfully - offline mode (1902ms)
|
||||||
|
✓ gets kicked when no credentials supplied in online mode (3720ms)
|
||||||
|
✓ does not crash for 10000ms (11731ms)
|
||||||
|
mc-server
|
||||||
|
✓ starts listening and shuts down cleanly
|
||||||
|
✓ kicks clients that do not log in (103ms)
|
||||||
|
✓ kicks clients that do not send keepalive packets (104ms)
|
||||||
|
✓ responds to ping requests
|
||||||
|
✓ clients can log in and chat (43ms)
|
||||||
|
✓ gives correct reason for kicking clients when shutting down
|
||||||
|
|
||||||
|
|
||||||
|
11 tests complete (45 seconds)
|
||||||
|
```
|
||||||
|
|
||||||
## Updating to a newer protocol version
|
## Updating to a newer protocol version
|
||||||
|
|
||||||
In most cases you should only have to do the following:
|
In most cases you should only have to do the following:
|
||||||
|
|
1
index.js
1
index.js
|
@ -108,7 +108,6 @@ function createServer(options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function createClient(options) {
|
function createClient(options) {
|
||||||
// defaults
|
|
||||||
assert.ok(options, "options is required");
|
assert.ok(options, "options is required");
|
||||||
var port = options.port || 25565;
|
var port = options.port || 25565;
|
||||||
var host = options.host || 'localhost';
|
var host = options.host || 'localhost';
|
||||||
|
|
Loading…
Reference in a new issue