A Minecraft server rcon-dependent library made only for Robocode school.
Project description
roborcon
Module created to provide first lessons on Python And Minecraft (1.16.5 pref) for students in Robocode school.
Usage/Examples
Example how to auto-build coliseum.
from roborcon import Rcon
rcon = Rcon("server-ip", "rcon-password")
rcon.setPlayer("PlayerNickname")
rcon.setColiseumSize(15,5)
rcon.createColiseum()
Sets player nickname(required)
rcon.setPlayer("PlayerNickname")
Execute any Rcon command.
rcon.execute("give @a minecraft:diamond")
Get player position (array).
x, y, z = rcon.getCoords()
Display title (bold red as default).
rcon.title("TitleText")
Get all items list (to console).
rcon.printItemNames()
Place blocks at position
rcon.setBlock(x, y, z, "block name or id")
Fill cubic area around player.
rcon.fill(area=5, "blockname", hollow=False, h=5)
Give player Armor, Sword with type
rcon.giveArmor("Diamond")
Spawns mob around player or at specific position (Set enemy to True if spawn around player, if False - spawning at specific position)
rcon.spawnMob("mobname", x=0, y=0, z=0, enemy=True, params="")
Checks if player has died between checks
rcon.checkDeath()
Change default params of coliseum size
rcon.setColiseumSize(area, height)
Create coliseum around player
rcon.createColiseum()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.