DailyShop
  • Get Started
  • Frequently Asked Questions
  • Usage
    • Manage Shops
    • Edit Items
    • Shop Display
      • Actions
    • Commands & Permissions
    • Reload
  • FEATURES
    • All Features
    • Log System
  • Configuration
    • Default Files
  • Yaml Support
    • Parser
    • Format
      • Rarities
      • Economies
      • Actions
  • Compatibility
  • PlaceHolders
  • ShopGui+
  • Developers
    • API
Powered by GitBook
On this page
  • Add DailyShop to your plugin
  • Get DailyShop Instance
  • Events

Was this helpful?

  1. Developers

API

All the events and methods of the plugin

Add DailyShop to your plugin

Since i don't have a public repositoty yet, you can go ahead and download the free version jar and add the jarfile to your classpath.

Get DailyShop Instance

    @Override
    public void onEnable() {
    
        DailyShop api = DailyShop.getInstance();
        shopsManager manager = api.getShopsManager();
    
    }

Events

/**
* Event called when a new shop
* is created. Cannot be cancelled
**/
public void foo(CreatedShopEvent e) {

    dShop shop = e.getShop;
    Timestamp time = e.getTimestamp();

}

/**
* Event called when a shop
* is deleted. Cannot be cancelled
**/
public void foo(deletedShopEvent e) {

    dShop shop = e.getShop;
    Timestamp time = e.getTimestamp();

}
/**
* Event called when shop item's
* are updated.
**/
public void foo(reStockShopEvent e) {

    dShop shop = e.getShop;
    Timestamp time = e.getTimestamp();

}
/**
* Event called when an item
* of a certain shop is updated
**/
public void foo(deletedShopEvent e) {

    dShop shop = e.getShop;
    Timestamp time = e.getTimestamp();
    dItem item = e.getItem();            // The item updated
    updateType type = e.getType();       // UPDATE_ITEM, NEXT_AMOUNT, DELETE_ITEM

}
PreviousShopGui+

Last updated 3 years ago

Was this helpful?