API

This area will explain how to hook into this plugin.

How do you hook into OneStopShop?

API Download: Link

  1. 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.

  2. Open your plugin.yml in your project and add softdepend: [OneStopShop] or depending on what type of plugin you're making add depend: [OneStopShop].

  3. 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