forked from Ghost-chu/QuickShop-Reremake
-
Notifications
You must be signed in to change notification settings - Fork 74
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.
All works must done before QuickShop onEnable() called. So you must do like that:
- Add depend into plugin.yml make sure QuickShop loaded before your plugin loaded.
softdepend: [QuickShop]- Impl the interface.
- 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.