API
This area will explain how to hook into this plugin.
How do you hook into OneStopShop?
API Download: Link
Download the API jar above and add it into your IDE plugin project dependencies as "provided" so the jar does not compile with the API jar included.
Open your
plugin.yml
in your project and addsoftdepend: [OneStopShop]
or depending on what type of plugin you're making adddepend: [OneStopShop]
.Now you're ready to get the plugin's methods, use the following:
OneStopShopAPI api = OneStopShop.getPlugin().getApi();
Examples:
# add a item to a shop
api.addShopItem(item, "armor-shop", 100.0, 500.0);
# get a item buy value
Double buy = api.getItemBuyValue(item);
# get a item sell value
Double sell = api.getItemSellValue(item);
API Methods
public void addShopItem(ItemStack item, String shop, double sell, double buy) {
}
public double getItemSellValue(ItemStack item) {
}
public double getItemBuyValue(ItemStack item) {
}
Last updated
Was this helpful?