Guides

Examples

Copy-paste snippets for common tasks. Replace the base URL and API key with your server's values.

All examples assume a base URL of https://mc.example.com and that the key header is required.

Broadcast a message

Send an announcement to every online player.

Python SDK (noxaeapi-sdk)
from noxaeapi_sdk import NoxAeApiClient

client = NoxAeApiClient.from_env()
client.server.broadcast("Server restarting in 5 minutes")

Teleport a player

Move a player to specific coordinates in a world. Players are addressed by UUID.

Python SDK (noxaeapi-sdk)
from noxaeapi_sdk import NoxAeApiClient

client = NoxAeApiClient.from_env()
uuid = "069a79f4-44e9-4726-a5be-fca90e38aaf5"

client.players.teleport(uuid, {
    "x": 128,
    "y": 64,
    "z": -220,
    "world": "world",
})

Check a balance

Read a player's economy balance (requires a Vault-compatible economy plugin).

Python SDK (noxaeapi-sdk)
from noxaeapi_sdk import NoxAeApiClient

client = NoxAeApiClient.from_env()
uuid = "069a79f4-44e9-4726-a5be-fca90e38aaf5"

data = client.economy.get_balance(uuid)
print(f"Current player balance: ${data['balance']}")

Check a permission

Resolve whether a player has a permission, accounting for inheritance and wildcards (requires LuckPerms).

Python SDK (noxaeapi-sdk)
from noxaeapi_sdk import NoxAeApiClient

client = NoxAeApiClient.from_env()
uuid = "069a79f4-44e9-4726-a5be-fca90e38aaf5"

result = client.luckperms.check_player_permission(uuid, "essentials.fly")
print("Has essentials.fly:", result.get("hasPermission", False))