Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
minecraft-protocol
Advanced tools
Parse and serialize minecraft packets, plus authentication and encryption.
Parse and serialize minecraft packets, plus authentication and encryption.
packet
events with packet fields as JavaScript
objects.Supports Minecraft version 1.4.7pre
var mc = require('minecraft-protocol');
var client = mc.createClient({
host: "localhost", // optional
port: 25565, // optional
username: "player",
email: "email@example.com", // email and password are required only for
password: "12345678", // online-mode=true servers
});
client.on(0x03, function(packet) {
// Listen for chat messages and echo them back.
if (packet.message.indexOf(client.session.username) !== -1) return;
client.write(0x03, {
message: packet.message,
});
});
var mc = require('minecraft-protocol');
var server = mc.createServer({
'online-mode': true, // optional
encryption: true, // optional
host: '0.0.0.0', // optional
port: 25565, // optional
});
server.on('login', function(client) {
client.write(0x01, {
entityId: client.id,
levelType: 'default',
gameMode: 0,
dimension: 0,
difficulty: 2,
maxPlayers: server.maxPlayers
});
client.write(0x0d, {
x: 0,
y: 1.62,
stance: 0,
z: 0,
yaw: 0,
pitch: 0,
onGround: true
});
client.write(0x03, { message: 'Hello, ' + client.username });
});
java
executable in PATH
.minecraft_server.jar
.MC_SERVER_JAR=path/to/minecraft_server.jar MC_USERNAME=username MC_EMAIL=email@example.com MC_PASSWORD=password npm test
In most cases you should only have to do the following:
packets.json
:protocolVersion
to the correct number.FAQs
Parse and serialize minecraft packets, plus authentication and encryption.
The npm package minecraft-protocol receives a total of 7,067 weekly downloads. As such, minecraft-protocol popularity was classified as popular.
We found that minecraft-protocol demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.