Skip to content
This repository was archived by the owner on Dec 5, 2021. It is now read-only.

Dev:Register replaceable module

Ghost_chu edited this page Apr 12, 2020 · 1 revision

Replaceable Module allow you replace QuickShop some part of code with yours.

Register

All works must done before QuickShop onEnable() called. So you must do like that:

  1. Add depend into plugin.yml make sure QuickShop loaded before your plugin loaded.
softdepend: [QuickShop]
  1. Impl the interface.
  2. Register your module into quickshop, quickshop use services manager so you need register yourself classes to services manager before quickshop booted up.
public void onLoad(){ //MUST ON ONLOAD METHOD
   ItemMatcher mathcer = new YourSelfMatcher();
   Bukkit.getServicesManager().register(mathcer, ItemMatcher.class, this, ServicePriority.NORMAL);
}

And we done, quickshop will use your module as expected.

Clone this wiki locally