Bounser / Nascraft

An alternative economy with dynamic prices based on supply and demand.
https://www.spigotmc.org/resources/108216/
MIT License
7 stars 1 forks source link

API Support #12

Open JanReich opened 2 months ago

JanReich commented 2 months ago

We have written our own little minion plugin the minions are responsable for a few task. One of the task is selling from a certain chest. This is the reason we need an API to get the current price of an ItemStack.

NascraftAPI api = NascraftAPI.initialize(); double currentPrice = api.getPrice(Material.OAK_DOOR);

or an method to sell an itemstack and get an Interger not an int as result that when the result is null then the material could not be sold to the marked.

NascraftAPI api = NascraftAPI.initialize(); Integer sellingValue = api.sellItem(itemStack);

We know that the plugin has selling wands but we would like to use our infrastructure that the minions of our players can sell the items with the dynamic prices.

Bounser commented 2 months ago

Im currently working on the API among other things, but you should already be able to do that by importing the jar, and then using NascraftAPI.getMarketManager();