Skip to main content

Library for creating servers and clients Minecraft Java Edition

Project description

pyCubes

PyPI example workflow example workflow codecov PyPI - License Downloads Code style: black Imports: isort


Documentation


pyCubes is a library for creating servers and clients Minecraft Java Edition.

❗ 0.x versions are not stable. The library API is subject to change.

Installation:

pip install pyCubes

Usage

First you need to create application instance:

import cubes

app = cubes.Application()

After that add a low-level handler:

async def process_handshake(packet_id: int, packet: cubes.ReadBuffer):
    print('Protocol version:', packet.varint)
    print('Server host:', packet.string)
    print('Server port:', packet.unsigned_short)
    print('Next state:', cubes.ConnectionStatus(packet.varint))

app.add_low_level_handler(cubes.ConnectionStatus.HANDSHAKE, 0x00, process_handshake)

All that remains is to launch the application:

app.run('127.0.0.1', 25565)

A more detailed example can be found here.

All packages are described here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyCubes-0.2.0.tar.gz (9.0 kB view hashes)

Uploaded Source

Built Distribution

pyCubes-0.2.0-py3-none-any.whl (10.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page