mcipc.server package
Submodules
mcipc.server.datastructures module
More complex data structures.
mcipc.server.datatypes module
Data types for the server protocol.
mcipc.server.enumerations module
Common enumerations.
mcipc.server.functions module
Common functions.
- mcipc.server.functions.rshift(integer: int, shift: int) int
Logical right binary shift.
mcipc.server.server module
The actual server.
- class mcipc.server.server.StubServer(description: str, *, version: str = '1.18.1', max_players: int = 20, protocol: int = 753)
Bases:
object
A stub minecraft server.
- property slp_content: dict
Returns the content of an SLP response.
- property slp_response: SLPResponse
Returns an SLP response.
- spawn(address: str, port: int)
Spawns the server on the respective socket.
- mcipc.server.server.get_response(text: str) bytes
Returns the response text message.
mcipc.server.stubsrv module
Stub server launcher.
- mcipc.server.stubsrv.main()
Main program.
Module contents
Minecraft server protocol.
- class mcipc.server.Handshake(protocol: VarInt, address: str, port: int, next_state: State)
Bases:
NamedTuple
Server-bound handshake packet.
- address: str
Alias for field number 1
- port: int
Alias for field number 2
- class mcipc.server.SLPResponse(packet_id: VarInt, json: dict)
Bases:
NamedTuple
A server list ping response.
- json: dict
Alias for field number 1
- classmethod read(file: IO) SLPResponse
Read an SLP response from a file-like object.
- class mcipc.server.State(value)
Bases:
VarInt
,Enum
Protocol state.
- HANDSHAKE = 0
- LOGIN = 2
- STATUS = 1
- class mcipc.server.StubServer(description: str, *, version: str = '1.18.1', max_players: int = 20, protocol: int = 753)
Bases:
object
A stub minecraft server.
- property slp_content: dict
Returns the content of an SLP response.
- property slp_response: SLPResponse
Returns an SLP response.
- spawn(address: str, port: int)
Spawns the server on the respective socket.
- class mcipc.server.VarInt
Bases:
int
Minecraft protocol VarInt type.
- mcipc.server.get_response(text: str) bytes
Returns the response text message.