forked from Telesphoreo/DynamicShop3
-
Notifications
You must be signed in to change notification settings - Fork 1
Developer API
Cupjok edited this page Sep 13, 2026
·
2 revisions
Other plugins can use me.sat7.dynamicshop.DynaShopAPI (add softdepend: [DynamicShop] to your plugin.yml).
- Open GUIs: a shop, the start page, quick sell, item/shop settings.
- Shops: list shop names (
getShops()), check a name (validateShopName), the currency of a shop, whether a shop is a Jobs points shop. - Prices and stock for an item in a shop:
getBuyPrice,getSellPrice,getStock,getMedian, and the tax rate. - Find the best shop:
FindTheBestShopToSell,FindTheBestShopToBuy. - Quick sell for a player:
QuickSell(player, itemStack, …). The same rules as/sellapply: only items a shop buys, and never for a payout of 0.
Use the API instead of reading or writing shop YAML files. Everything else is internal and can change.
me.sat7.dynamicshop.events.ShopBuySellEvent is called after every buy and sell. It carries the shop, item, player, old/new buy and sell price, old/new stock and the median.
mvn clean package target/DynamicShop-<version>.jar
mvn test
- Needs JDK 25+ to build, because the bundled MultiCurrency API is Java 25 bytecode. The jar it produces is Java 21 and is compiled against the Minecraft 1.21 API.
-
mvn -Pcompat-26 compilecompiles against the newest API, to catch removed methods. -
tools/api-kind-check.pychecks the built jar for API calls that break between versions. -
tools/compat-matrix/starts real test servers for many versions (with an optional GUI bot). See itsrun-matrix.sh.
Repository: https://github.com/Cupjok/DynamicShop3