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

PageDescription
Decorators@event, @command, @task
ExceptionsBridgeError, EntityGoneException
EnumValueBase class for all enum types
EventEvent proxy and event types

Server & Entities

PageDescription
ServerGlobal server API
EntityBase entity proxy
PlayerPlayer API (extends Entity)
Entity SubtypesArmorStand, Villager, ItemFrame, FallingBlock, AreaEffectCloud

World & Space

PageDescription
WorldWorld API, region utilities, particle shapes, spawn helpers
Location3D position with world, yaw, and pitch
BlockBlock in the world
BlockSnapshotCapture and restore block regions
ChunkWorld chunk loading/unloading
Vector3D vector

Items & Inventory

PageDescription
ItemItemStack API
ItemBuilderFluent item construction
InventoryInventory management
RecipeCustom crafting recipes
MaterialMaterial enum

Effects & Attributes

PageDescription
EffectPotion effects
PotionLegacy potion API
AttributeEntity attributes

Scoreboards & UI

PageDescription
BossBarBoss bar API
ScoreboardScoreboard API
TeamTeam API
ObjectiveObjective API
SidebarSidebar helper
AdvancementAdvancement API

Helpers

PageDescription
ConfigConfiguration files (TOML, JSON, properties)
CooldownPer-player cooldowns
StateKey-value state container
HologramFloating text entities
MenuChest GUI builder
PaginatorMulti-page menu
ActionBarDisplayPersistent action bar messages
BossBarDisplayBoss bar wrapper with cooldown linking
FireworkEffectFirework builder
TextComponentRich text components
BookBuilderWritten book builder

Display Entities

PageDescription
BlockDisplayBlock display entity
ItemDisplayItem display entity
ImageDisplayPixel art display
MeshDisplay3D triangle mesh rendering

Utilities

PageDescription
RaycastRay tracing in the world
ChatChat broadcast helper
ReflectJava reflection access
EnumsAll enum types

Extensions ext

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

PageDescription
ImageDisplayPixel art display
MeshDisplay3D triangle mesh rendering
QuestQuest system with progress tracking
DialogBranching NPC dialog sequences
BankGlobal currency / bank system
ShopChest-GUI shop with pagination
TradeWindowTwo-player trade GUI
AbilityPlayer abilities with cooldowns and mana
ManaStorePer-player mana tracking
CombatSystemCombat tagging and logging
LevelSystemXP and levelling
RegionCuboid region with enter/exit events
PartyTemporary player groups
GuildPersistent guild system
CustomItemCustom item registry
LeaderboardHologram-based live leaderboard
VisualEffectSequenced particle/sound effects
PlayerDataStorePersistent per-player key/value storage
DungeonInstanced dungeon system with WFC generation
NPCCustom NPC entities
SchedulerAdvanced task scheduling
StateMachineFinite state machine
TabListAdvanced tab list management
PlaceholderPlaceholder string registry
LootTableLoot table generation
ClientModClient capability bridge with permissions, commands, and data channel

Examples

PageDescription
ExamplesFull script examples

Internals

PageDescription
BridgeOverview of the bridge architecture and wire protocol
EventsEvent subscriptions, dispatch, cancellation, overrides, and commands
ExecutionCall dispatch, threading, timing, and batching
SerializationObject handles, type serialization, and proxy classes
LifecycleStartup, shutdown, and hot reload
DebuggingDebug logging, metrics, error codes, and performance tips