Protocol: Minecraft
Deprecated pre-release Minecraft API object.
class Minecraft(Protocol)
Related API: LegacyBlockResult, LegacyGameRules, MinecraftAfterEvents, MinecraftBeforeEvents, PositionDto, Vector3Dto
Properties
current_tick
@property
def current_tick(self) -> int:
game_rules
@property
def game_rules(self) -> LegacyGameRules:
Related API: LegacyGameRules
before_events
@property
def before_events(self) -> MinecraftBeforeEvents:
Related API: MinecraftBeforeEvents
after_events
@property
def after_events(self) -> MinecraftAfterEvents:
Related API: MinecraftAfterEvents
Methods
system_message
def system_message(self, message: str) -> None:
Broadcast a server chat message.
command
def command(self, command: str) -> int:
Execute an administrative command and return its success count.
get_block
def get_block(self, position: Vector3Dto) -> LegacyBlockResult:
Return legacy block data for an integer position.
Related API: LegacyBlockResult, Vector3Dto
set_block
def set_block(self, key: str, position: Vector3Dto) -> bool:
Replace one block and report whether the operation succeeded.
Related API: Vector3Dto
set_blocks
def set_blocks(self, states: Sequence[PositionDto], *, async_: Optional[bool]=...) -> None:
Apply multiple block replacements.
Related API: PositionDto