Commit graph

125 commits

Author SHA1 Message Date
christopher james churchill
bc94bc1fe0 Update proxy.js
changing == to === and != to !== becuase js is a bitch see: 
http://www.impressivewebs.com/why-use-triple-equals-javascipt/
2016-03-21 14:46:06 +00:00
christopher james churchill
d9782d6d9f Update proxy.js
fixing type in example code :D
2016-03-21 14:40:53 +00:00
Romain Beaumont
440a190780 update to 1.9-pre4, improve the proxy errors a bit 2016-02-27 18:10:11 +01:00
Romain Beaumont
d78d87b9fc update to new minecraft-data protocol schema 2016-02-23 18:42:01 +01:00
Romain Beaumont
91ccac44df index custom packets by version 2016-02-20 17:19:36 +01:00
Romain Beaumont
eba07e6b90 add an optional property to add custom packets to createClient and createServer 2016-02-20 17:19:36 +01:00
Romain Beaumont
a698749387 fix state displaying in proxy 2016-02-15 23:18:57 +01:00
Romain Beaumont
86397e7d06 display error in proxy 2016-02-15 20:50:42 +01:00
deathcap
a807bdd872 Fix client_chat example extra array iteration. Closes GH-343 2016-02-09 20:30:40 -08:00
Romain Beaumont
77d4583d06 Merge pull request #340 from deathcap/connection-lost
Log when connection lost in client_echo example
2016-02-07 09:19:23 +01:00
deathcap
91f7e23338 Log when connection lost in client_echo example 2016-02-07 00:05:55 -08:00
deathcap
f9e302c08e Remove client chat exclusion from server 2016-02-06 16:06:45 -08:00
deathcap
9a68fd6c34 Support options.version==false in createClient() to auto-detect version 2016-01-30 22:53:38 -08:00
deathcap
66e6f4dd0b Update to use compatible sync API (createClient) 2016-01-30 22:16:36 -08:00
deathcap
a53a2977f2 Add dynamic cross-protocol support 2016-01-27 23:28:27 -08:00
deathcap
4aac85c09a Show disconnect reason in examples 2016-01-22 00:32:36 -08:00
Romain Beaumont
43d56de2f6 fix cli options doc proxy example, fix #313 2016-01-07 01:55:28 +01:00
Romain Beaumont
b2b53c9343 a few small changes to make the code better 2015-11-30 22:19:56 +01:00
Romain Beaumont
57d9c05941 use require-self to be able to use require('minecraft-protocol') in examples 2015-11-30 13:23:38 +01:00
Romain Beaumont
787f8d3423 fix gamemode3 in proxy : fix #146
* correctly generate the same uuidv3 than the vanilla server does in offline mode : fix #282
* remove "one player online mode" in the proxy : it doesn't make sense to identify all players as the user/passwd given in the cli. Now both servers in offline mode.
2015-11-08 23:34:15 +01:00
Romain Beaumont
23b077b76f fix compression in proxy, fix #292 2015-11-08 23:34:15 +01:00
Romain Beaumont
f45c6dff49 use protodef:
* move general datatypes to protodef along with their tests
* move states to states.js file
* use one protodef serializer by state and direction instead of one big serializer for everything (same thing for the deserializer)
* define a packet as a protodef type using a switch and a container, and adding each minecraft packet as a type (packet_ + name)
* use mapper type from protodef to convert id to name in packet definition
* use general string type : pstring
* divide by 10 the number of iteration in the benchmark to get back to a reasonable test execution time
2015-11-08 23:29:51 +01:00
Romain Beaumont
0da2b14607 change dependency from buffertools to buffer-equal in proxy 2015-10-13 17:15:49 +02:00
Romain Beaumont
30fd138ae9 use bufferEqual instead of buffertools
native modules are annoying
2015-10-13 17:11:51 +02:00
Romain Beaumont
3f50a6f19a add an optional argument to the proxy example to specify the version 2015-09-30 00:17:44 +02:00
Romain Beaumont
7871ac446a fix proxy relatively to the unexposing of createPacketBuffer
also fix a small bug in serializer.js
2015-09-30 00:03:42 +02:00
Robin Lambertz
a337e5ae3e Merge pull request #249 from rom1504/fix_client_chat
clean up and fix client_chat
2015-09-23 20:25:03 +02:00
Robin Lambertz
84b32fd4d3 Merge pull request #250 from rom1504/fix_server
fix server example
2015-09-23 19:43:30 +02:00
Robin Lambertz
c2749505e8 Merge pull request #251 from rom1504/fix_client_echo
fix client_echo example
2015-09-23 19:43:19 +02:00
roblabla
cf1503f9de Fix proxy.js 2015-09-23 15:22:02 +02:00
Romain Beaumont
272a28701c fix client_echo example 2015-09-20 22:19:39 +02:00
Romain Beaumont
0d5b122423 fix server example 2015-09-20 22:10:20 +02:00
Romain Beaumont
a3cd6c49ad clean up and fix client_chat 2015-09-20 22:00:43 +02:00
Romain Beaumont
0ce00f2cc7 put keepAlive: false in proxy.js : fix connecting to a proxy with some lag (ie not with both proxy and vanilla client in localhost) 2015-08-08 17:29:54 +02:00
Romain Beaumont
145c6b4840 add a little info in the proxy example 2015-08-06 00:04:53 +02:00
Romain Beaumont
5743cd8b64 Revert "Add some debug information (useful to update to an updated protocol)"
This reverts commit d2435c8dcd.
2015-08-05 23:30:04 +02:00
Romain Beaumont
d2435c8dcd Add some debug information (useful to update to an updated protocol) 2015-08-02 18:14:58 +02:00
Romain Beaumont
a3c65de9a4 Display more information in proxy.js 2015-08-02 18:14:52 +02:00
Romain Beaumont
1a9e08cbd8 move createPacketBuffer and parsePacketData functions to serializer, also move protocol's exports to serializer 2015-05-23 03:31:47 +02:00
radare-travis
ad2ad01787 Quickfix for proxy example to properly handle compression changes 2015-05-16 01:08:41 +00:00
Romain Beaumont
1dec8ccffd fix indentation and a few other stuff webstorm felt like fixing (for example if (condition) -> if(condition) since that was the more frequent style in node-minecraft-protocol) 2015-05-14 22:08:49 +02:00
Will Franzen
f8ca29f892 Update server_helloworld.js 2015-03-26 10:26:43 -05:00
Will Franzen
dbfa0f631f Update server.js 2015-03-26 10:26:21 -05:00
Will Franzen
879d525fc5 Update proxy.js 2015-03-26 10:26:01 -05:00
Will Franzen
7ede9c3dcd Update client_echo.js 2015-03-26 10:25:36 -05:00
Will Franzen
bfc39811e4 Update client_chat.js 2015-03-26 10:24:17 -05:00
Will Franzen
c6404f0274 Merge branch 'master' of https://github.com/PrismarineJS/node-minecraft-protocol into fix-122 2015-03-25 14:08:33 -05:00
Will Franzen
f9b3359577 Give each example its own package.json to resolve #122 2015-03-25 14:07:29 -05:00
Josh Wolfe
a43e1af1d5 adding incoming and outgoing filters for proxy.js --dump arguments. 2015-03-24 16:44:11 -07:00
Josh Wolfe
bceea2f896 adding command line switches to examples/proxy.js for dumping messages 2015-03-18 03:58:20 -07:00
roblabla
bbace6b62d Fix proxy.js template string v2 2015-03-06 23:14:36 +00:00
roblabla
50f216cdaf Remove template string from proxy.js 2015-03-06 22:58:58 +00:00
roblabla
e94876d30a Properly close chat example when connection fails or errors 2015-03-06 16:43:05 +00:00
roblabla
c1ced61d47 Make proxy able to spot discrepencies in input/output buffer. 2015-03-03 12:43:46 +00:00
roblabla
25f2658895 Don't output huge packets 2015-02-24 23:44:59 +00:00
roblabla
31f6d8380e Publish debugging tool, fix bugs in protojs 2015-02-22 22:13:22 +00:00
roblabla
d657371b6b Fix compression. Implement position. Add some debugging utilities. 2015-01-01 22:20:47 +00:00
roblabla
2f90252eaa Merge upstream, fix mistakes in examples 2014-03-16 18:14:55 +01:00
roblabla
244ad8ed39 Use ProtocolLib naming scheme. Use hasOwnProperty instead of equality 2014-03-16 18:06:57 +01:00
deathcap
0cd3ed13d9 Add packet names 2014-01-13 21:56:56 -08:00
roblabla
018fb6407f Add new chat client example 2014-01-06 00:57:29 +01:00
roblabla
875d10ed0b Protocol 1.7 support, Yggdrasil login support, new Client State API 2014-01-06 00:57:18 +01:00
darthfett
9b274df54a Cleanup: terminate all statements with semicolons, remove unnecessary semicolons, remove unused variables, add hasOwnProperty checks in 'for x in y' loops. 2013-11-19 16:55:30 -07:00
Xabier de Zuazo
8e02b4f0b0 examples updated to work with 1.6.1 2013-07-09 08:11:09 +02:00
Andrew Kelley
adc47b0f62 fix incorrect playerCount in ping. closes #41 2013-02-10 17:51:47 -05:00
Andrew Kelley
df3f95e1ff don't require both email and username. closes #32
This change breaks backwards compatibility.

`createClient` no longer takes an `email` argument. Instead, the
`username` argument is used to authenticate and determine the
case correct username.

There is a special case if you leave out the `password` argument.
In this case, `username` is used to connect directly to the server,
and you may get kicked if the server is in online mode.
2013-01-30 19:56:43 -05:00
Robin Lambertz
ebc6af6a7e Added server encryption and online mode 2013-01-27 01:12:09 +00:00
Andrew Kelley
2e75851fd6 test passing: clients can log in and chat 2013-01-04 22:47:54 -05:00
Andrew Kelley
c9ed8a2792 server API update
* add passing test for "starts listening"
 * server.socket -> server.socketServer
 * add client.id which can be used as entity id
 * add server.clients which is {clientId: client}
 * update server examples
 * server emits 'close' event, not 'end' event
 * add server.close()
2013-01-04 20:22:19 -05:00
Andrew Kelley
3a8bfaf8e3 refactor + createServer support 2013-01-04 01:45:57 -05:00
Andrew Kelley
e783b8a1b3 documentation/examples for server 2013-01-03 22:01:17 -05:00
Andrew Kelley
62e66be053 writePacket -> write 2013-01-03 21:42:50 -05:00
Andrew Kelley
fadb9e0c0a un-namespace packet events. remove generic packet event. 2013-01-03 20:59:58 -05:00
Andrew Kelley
fa1a8db52a update example code with new packet specific events 2013-01-02 21:59:40 -05:00
Andrew Kelley
4b0780db66 all tests passing. closes #3 2013-01-02 03:30:33 -05:00