Commit graph

1369 commits

Author SHA1 Message Date
u9g
014635f772
Explicitly add 1.17.1 support (#876)
* Explicitly add 1.17.1 support

* Update ci.yml

* Update README.md
2021-07-18 18:36:33 +02:00
Rob9315
78f038cae6
Add beforeLogin function option on server (#871)
* Add `beforeLogin` event on server

* optional function passin instead of emitted event

* Add documentation and bump version

* undo release push

* add test for `beforeLogin`
2021-07-06 12:42:00 +02:00
dependabot[bot]
ac099c1d31
Bump @types/node from 15.14.1 to 16.0.0 (#873)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.14.1 to 16.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-05 16:40:44 -04:00
Jordan Jones
4d5dbb118e
automatic port "discovery" for packets and server tests (#870)
* automatic port "discovery" for packets and server tests

* Semi-colon begone!

* move getport to commons file - u9g

* Merge code
2021-06-28 22:58:21 -04:00
u9g
75e5316e8b
make port discovery automatic & update java ver for 1.17 (#869)
* make port discovery automatic

* try to use promise instead of promisify

* update java version

* add faster timeout

* increase timeout duration for server startup

* Update ci.yml

* update ram

* update java again

* Update clientTest.js

* actually skip online

* Update clientTest.js

* comment out

* fix comment

* properly await server data deletion

* fix serverTest for 1.17 with backwards compat

* add back dimension to login packet

* remove comment

* remove duplicated dimension in server test

Co-authored-by: Romain Beaumont <romain.rom1@gmail.com>
2021-06-29 00:27:37 +02:00
James Galbraith
fd174189a1
Make cache path creation recursive (#857) 2021-06-28 23:32:15 +02:00
AngeryFrog
da4f293860
Mc.ping return a promise and use callbacks (#849)
* Added promised based ping

* made it possible too use both promises and callbacks

* Forgot too mention the callback is optional

* Tests

* Promisify the ping function
2021-06-19 22:03:26 +02:00
Romain Beaumont
aac922dd3d
Make 1.17 explicitly tested (#866)
* Make 1.17 explicitly tested

* update readme
2021-06-17 00:05:04 +02:00
u9g
5d5d76f35d
try to fix tests working per version (#867)
* try to fix tests working per version

* fix nonpartests

* fix
2021-06-16 23:58:20 +02:00
circuit10
66f17e43eb
Fix slightly malformed chunk in example (#864) 2021-06-16 22:50:41 +02:00
Lupa
63846c6c15
Add setSocket to Typings (#858)
* setSocket is missing in typings

* Fix lint

* Better descriptive name
2021-06-16 22:49:04 +02:00
dependabot[bot]
c9a6484a09
Bump mocha from 8.4.0 to 9.0.0 (#860)
Bumps [mocha](https://github.com/mochajs/mocha) from 8.4.0 to 9.0.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v8.4.0...v9.0.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-16 22:45:45 +02:00
u9g
3813d4de7d
Make ci clearer as to what version is being tested (#861)
* Make ci clearer as to what version is being tested

* Update ci.yml

* fix

* fix
2021-06-13 04:54:16 +02:00
Grooble
1796b9693d
Add a way to encode a packet only once and send it to multiple clients (#851)
* Added Server#.writeToClients()

* Documented server.writeToClients()

* Added test for Server#writeToClients()

* Bad arguments for Promise.all()

* Fixed tests

* Fixed tests

* Fixed tests

* Updated tests

* Reverted timeout to the normal
2021-05-02 01:12:37 +02:00
dependabot-preview[bot]
d22595021b
Bump @types/node from 14.14.43 to 15.0.1 (#853)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.43 to 15.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-02 01:07:10 +02:00
dependabot-preview[bot]
4d0135f186
Upgrade to GitHub-native Dependabot (#854)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-02 01:03:36 +02:00
u9g
50af73c912
Fix mcdata in deps (#850) 2021-04-20 12:27:32 +02:00
u9g
6df20541b4
Add snapshot 21w07a support (#838)
* Add snapshot `21w07a` support

* Update package.json

* Update version.js

* Update ci.yml

* update mcdata

* Update README.md

* Update mcdata

* Add 21w07a to tested versions

Co-authored-by: Romain Beaumont <romain.rom1@gmail.com>
2021-04-16 22:56:39 +02:00
IceTank
ebbd93f2b6
Added README and more error Handling to client_socks_proxy example (#846)
* Added README and more error Handling to client_socks_proxy example.

* Lint fixing
2021-04-11 23:15:15 +02:00
Moondarker
f509095bd2
launcher_accounts.json account corruption fix (#845)
* launcher_accounts.json account corruption fix

* Prevent MS accounts from being removed if option.auth is not specified
2021-04-11 23:14:19 +02:00
Nihat
4a85609902
Update remove color regex in ping.js (#848) 2021-04-11 23:13:06 +02:00
Nihat
6987c3aff6
Create ping.js example (#847) 2021-04-11 22:55:53 +02:00
Romain Beaumont
61789bbea9
Release 1.25.0 (#844)
* Update HISTORY.md

* Update package.json
2021-04-08 02:33:02 +02:00
Romain Beaumont
fd331399ba
add fullBuffer to packet event 2021-04-08 02:30:48 +02:00
u9g
d3c16e48fb
Add packet cycletests (#842)
* Add packet cycletests

* add mcPackets to deps

* Update and rename cycleTest.js to non-par-test.js

* Add exclude to npm run test for non par tests

* Add seperate job for non-par-tests

* fix indentation

* make tests non-parallel

* fix yml

* fix exclude pattern

* fix test matching

* Fix protocol not being updated for different mc versions

* dynamically get packets to test

* get rid of unused var

* rename non-par-test
2021-04-07 16:13:57 +02:00
u9g
294e20b54a
Add compiler example (#841)
* Initial commit

* require minecraft-data

* use buffer.compare instead of ===

* use .equals

* Fix flipped serializer
2021-04-06 22:44:17 +02:00
Romain Beaumont
bfb1472e7e
Make 1.16.5 the default (#840) 2021-04-06 01:34:05 +02:00
u9g
4aaa837a7d
changed clientsmap and client (#836)
implements (and closes) https://github.com/PrismarineJS/node-minecraft-protocol/issues/818
2021-03-29 09:44:24 +02:00
u9g
bdf792c534
Release 1.24.2 (#831)
* Release 1.24.2

* Update HISTORY.md
2021-03-26 23:59:37 +01:00
u9g
7ebda8047b
Throw if data is not available for a given version (#830)
* Throw if mcData is invalid

* Update serializer.js

* fix lint
2021-03-26 23:40:45 +01:00
Romain Beaumont
192e08cd3b
Release 1.24.1 2021-03-22 14:01:13 +01:00
Majorblake
9d6e3a9092
fix write to launcher_accounts.json (#827)
fix minecraftProfile id missing when writing new profile to launcher_accounts.json, causing yggdrasil to fail when authenticating session
2021-03-22 13:58:00 +01:00
Romain Beaumont
7a2fee1b05 Release 1.24.0 2021-03-20 22:33:42 +00:00
Moondarker
50480f5bfe
Using launcher_accounts.json as new token source (#826)
* Using launcher_accounts.json as new token source

* Fixed a couple of problems in ae7fd65
2021-03-20 23:29:39 +01:00
extremeheat
eaed25f497
Fix msa caching bug (#825) 2021-03-20 23:28:22 +01:00
Romain Beaumont
e56355a508 Release 1.23.3 2021-03-13 01:39:46 +00:00
Romain Beaumont
f363b7d785
add a reason to end connection in keepalive client 2021-03-13 02:38:13 +01:00
Romain Beaumont
e9cb2ffbd7 Release 1.23.2 2021-03-01 23:34:32 +00:00
Romain Beaumont
cbfa9ef046
Remove test code from microsoftAuth that was getting called at import time 2021-03-02 00:32:19 +01:00
Romain Beaumont
34e59fd88e Release 1.23.1 2021-02-06 10:05:50 +00:00
Romain Beaumont
b3953a3bcd Revert "Refactor/Cleanup TCP_DNS (#810)"
This didn't work

This reverts commit 10984fd5d5.
2021-02-06 10:05:01 +00:00
Romain Beaumont
5344f59b52 Release 1.23.0 2021-01-30 00:26:01 +00:00
Rob9315
bf309ba5a4
fix launcher_profiles.json problems (#813)
fixes launcher_profiles.json (formerly launcher_accounts.json) not being written to (all clienttokens being deleted) in specific cases
2021-01-30 01:22:12 +01:00
Jordan Jones
10984fd5d5
Refactor/Cleanup TCP_DNS (#810)
* Refactor/Cleanup TCP_DNS

* remove return

* nvm
2021-01-30 01:21:36 +01:00
extremeheat
8f2a027812
Msa device code auth (#806)
* initial msa work

* rm debug code

* Update package.json

* lint, seperate constants, create missing msa cache

* support multiple profiles

* lint

* use shared constants

* fix path issues

* fix token variable

* fix caching msa profile data

* switch clientId to one from microsoft

* store caches in .minecraft, fallback to dev code auth when user+pass fails

* update electron demo, fix error handling, add docs

* fix caching dir

* fix lint

* move to class scope, token fixes

* retry on fail, terminology fixes

* fix promise bug

* cleanup
2021-01-30 01:21:03 +01:00
u9g
41a2d064ce
add auth type (#799)
made it only accept 'mojang' or 'microsoft' as anything else wouldn't be accepted anyway
2020-12-31 21:27:39 +01:00
Romain Beaumont
78aa3d1b6a Release 1.22.0 2020-12-28 01:45:46 +00:00
Evan Goode
7492025d65
Don't stringify every packet if debug not enabled (#797) 2020-12-28 02:42:19 +01:00
ph0t0shop
c7a021d689
Add handler for Login Plugin Message (#795)
* Add handler for plugin message

* Update pluginChannels.js
2020-12-20 03:35:13 +01:00
dada513
ea52fb8c13
Fixed password=false not using offline mode (#790)
* Fixed password=false not using offline mode

* revert client token change
2020-12-18 20:49:58 +01:00