Skip to main content
JPPrison exposes a Java API for plugin developers who need to read or write economy balances, check if a player can afford something, or react to economy transactions. This is useful for shop plugins, crate plugins, quest systems, and web stores.

Available API Surface

  • JPPrisonAPI — static economy management class for reading and modifying balances
  • BalanceChangeEvent — cancellable Bukkit event fired before every balance write
  • EconomyCost — cost string parser that supports config-driven, multi-economy pricing
  • WorldGuard flag accessor — check whether a location is inside a JPPrison-managed rewards region
  • PlaceholderAPI expansion — use %jpprison_<variable>% in scoreboards, holograms, chat, and tab lists

Getting the API

Declare JPPrison as a dependency in your plugin.yml so Bukkit loads it before your plugin:
If your plugin can function without JPPrison, declare it as a soft dependency instead:
When using a soft dependency, guard every API call with a presence check:

Maven / Gradle

Include the JPPrison jar as a provided (compile-only) dependency in your build — it must be present on the server at runtime, but you should not bundle it inside your own jar.

Explore the API

Economy API

Read balances, give and take currency, and process atomic purchases with JPPrisonAPI.

Events

Listen for BalanceChangeEvent to react to or cancel any economy transaction.

Placeholders

Use %jpprison_<variable>% with PlaceholderAPI in scoreboards, holograms, and chat.

WorldGuard Integration

Access the jpprison-enchants flag to check reward regions from your own plugin.