npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@boem312/minecraft-server

v1.4.6

Published

A pure JS library to create Minecraft Java 1.16.3 servers

Downloads

19

Readme

Banner Image

A pure JS library to create Minecraft Java 1.16.3 servers

Resources: Github NPM Docs

| This package does not cover the full Minecraft Java protocol yet. It only covers parts of the 1.16.3 protocol. To check what parts of the protocol are covered, see the Excel packet spreadsheet and the docs. | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

This is a pure JS library that gives you access to an easy to use API that you can use to create Minecraft Java 1.16.3 servers. This package has types built in. You have full control over the packets that are being sent to the Clients in an easy to use way. This means you can send different information to each Client, so that for example, for one Client it is raining and for a different one it's not.

Installation and usage

  1. Install with npm i @boem312/minecraft-server.
  2. Now you can use the library. Here's some example code:
const { Server } = require('@boem312/minecraft-server');
const server = new Server();

server.on('connect', client => {

    console.log(`${client.username} joined`);
    client.chat(`Hello world, ${client.username}`);

});

server.on('listening', () => console.log('Listening on localhost:25565'));
  1. Join the server with Minecraft Java Edition version 1.16.3 on host localhost and on port 25565. Different versions and ports are currently not supported.

For more examples, please see the examples folder.

If you want to now how to use the rest of the library, please see the documentation.

If you have any questions please first read the FAQ. If your question isn't in there, you can ask a question in discussions.

Key features

  • Easy to use, you can create servers in an intuitive way.
  • Everything is per Client, meaning you can send different information to different Clients.

Terms

These are some terms that are used in the code and documentation.

Client

The Client is the system that is connecting/connected to the Server.

Link to latest docs for Client

Player

A player is just a type of Entity. It is the thing that a Client sees, when they see other people. Each Client has it's own players. Here's an example:

In this case, there are two Clients online; Notch and jeb_ (top level) and they both see one another. A Player doesn't have to be a Client, it could also just look like one, without being actually connected to the server. Here's an example of that:

  • Notch (Client)
    • jeb_ (Player)
    • Hub (Player)
  • jeb_ (Client)
    • Hub (Player)

Here Notch sees jeb_, but jeb_ doesn't see Notch. Both jeb_ and Notch see the Player (not connected to the server) Hub. Hub isn't a Client that is connected to the server, but looks like one to Notch and jeb_.

Entity

Entities include all dynamic, moving objects throughout the Minecraft world. Some examples of entities are:

  • Pigs
  • Armor stands
  • Minecarts
  • Players
  • Falling blocks

Contributing

See contributing.md

License

For the full license, see license.md. This package uses the ISC license.

Explanation of ISC license

Special thanks