Expose Bukkit APIs to Python scripts via easy-to-use wrappers

PyJavaBridge

PyJavaBridge is a Minecraft server plugin that lets you write Python scripts that interact with the Bukkit/Spigot/Paper API through a high-level async bridge. Every API call is asynchronous under the hood — you write clean async/await Python and the bridge handles the Java ↔ Python communication transparently.

Quick Start

from bridge import *

@command("Say hello")
async def hello(event: Event):
    await event.player.send_message("Hello from Python!")

Drop your .py file into the server's scripts/ folder and reload. The bridge discovers your @command and @event handlers automatically.

Key Features

Pages

Decorators & Core

Page Description
Decorators @event, @command, @task
Exceptions BridgeError, EntityGoneException
EnumValue Base class for all enum types
Event Event proxy and event types

Server & Entities

Page Description
Server Global server API
Entity Base entity proxy
Player Player API (extends Entity)

World & Space

Page Description
World World API, region utilities, particle shapes, spawn helpers
Location 3D position with world, yaw, and pitch
Block Block in the world
Chunk World chunk loading/unloading
Vector 3D vector

Items & Inventory

Page Description
Item ItemStack API
ItemBuilder Fluent item construction
Inventory Inventory management
Material Material enum

Effects & Attributes

Page Description
Effect Potion effects
Potion Legacy potion API
Attribute Entity attributes

Scoreboards & UI

Page Description
BossBar Boss bar API
Scoreboard Scoreboard API
Team Team API
Objective Objective API
Sidebar Sidebar helper
Advancement Advancement API

Helpers

Page Description
Config Configuration files (TOML, JSON, properties)
Cooldown Per-player cooldowns
Hologram Floating text entities
Menu Chest GUI builder
Paginator Multi-page menu
ActionBarDisplay Persistent action bar messages
BossBarDisplay Boss bar wrapper with cooldown linking

Display Entities

Page Description
BlockDisplay Block display entity
ItemDisplay Item display entity
ImageDisplay Pixel art display
MeshDisplay 3D triangle mesh rendering

Utilities

Page Description
Raycast Ray tracing in the world
Chat Chat broadcast helper
Reflect Java reflection access
Enums All enum types

Extensions ext

Extensions are imported separately via from bridge.extensions import ....

Page Description
ImageDisplay Pixel art display
MeshDisplay 3D triangle mesh rendering
Quest Quest system with progress tracking
Dialog Branching NPC dialog sequences
Bank Global currency / bank system
Shop Chest-GUI shop with pagination
TradeWindow Two-player trade GUI
Ability Player abilities with cooldowns and mana
ManaStore Per-player mana tracking
CombatSystem Combat tagging and logging
LevelSystem XP and levelling
Region Cuboid region with enter/exit events
Party Temporary player groups
Guild Persistent guild system
CustomItem Custom item registry
Leaderboard Hologram-based live leaderboard
VisualEffect Sequenced particle/sound effects
PlayerDataStore Persistent per-player key/value storage
Dungeon Instanced dungeon system with WFC generation

Examples

Page Description
Examples Full script examples

Internals

Page Description
Bridge Overview of the bridge architecture and wire protocol
Events Event subscriptions, dispatch, cancellation, overrides, and commands
Execution Call dispatch, threading, timing, and batching
Serialization Object handles, type serialization, and proxy classes
Lifecycle Startup, shutdown, and hot reload
Debugging Debug logging, metrics, error codes, and performance tips