Skip to content

The Protobuf protocol used for Minecraft server - client communication

License

Notifications You must be signed in to change notification settings

mcpq/mcpq-proto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft Protobuf Queries (MCPQ) Protocol

This repository holds the Protocol Buffer (Protobuf) files used by gRPC to generate the remote procedure call (RPC) communication used to communicate between a Minecraft Java server via a plugin and its client libraries.

The only reason why you might be interested in these files is:

  • You want to implement your own plugin/interface to communicate with
  • You want to implement your own client library, maybe in a new language

Otherwise, if you just want to use the communication protocol, check out the already implemented plugin and its client libraries.

Why Protobuf (gRPC)?

Using this protocol has a number of advantages:

Check out the official documentation.

How to use?

You can either download the version of the minecraft.proto file that you want to implement, or better, integrate this repository as a git submodule:

# add the submodule, potentiall in a subdirectory named 'proto'
git submodule add https://github.com/mcpq/mcpq-proto <optional-submodule/>proto
cd <optional-submodule/>proto
# checkout the version/tag/commit of the protocol you want to use
git checkout v1
# return to root of repository
cd ..  
# fix the version by adding and commiting it
git add <optional-submodule/>proto
# when adding a submodule for the first time, also add this 
git add .gitmodules

If you want to change the version of an existing submodule:

cd <optional-submodule/>proto
# checkout the version/tag/commit of the protocol you want to use
git checkout <?>
# return to root of repository
cd .. 
# fix the version by adding and commiting it
git add <optional-submodule/>proto
git commit -m "updated protocol to version ?"

To clone a repository with submodules (or update an existing one):

# clone the repository and all its submodules
git clone --recurse-submodules <repository-with-submodules>

# or use the following in an already cloned repository to update
git submodule update --init --recursive

What operations does the protocol support/specify?

Checkout the minecraft.proto file, which is visualized below using protodot:

Visualization of minecraft.proto

Version Changes

Version (Tag) Backward Compatible Forward Compatible
v1 - -

Software using this protocol should specify which version of the protocol they are using (e.g. as their major version number)

License

LGPLv3

Note: The intent behind the chosen license, is to allow the licensed software to be used (as is) in any type of project, even commercial or closed-source ones. However, changes or modifications to the licensed software itself must be shared via the same license openly. Checkout this blog for an in-depth explanation.

About

The Protobuf protocol used for Minecraft server - client communication

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published