Skip to content

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.
publicvoidonLoad(){ //MUST ON ONLOAD METHODItemMatchermathcer = newYourSelfMatcher();
Bukkit.getServicesManager().register(mathcer, ItemMatcher.class, this, ServicePriority.NORMAL);
}

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

Clone this wiki locally