mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-15 21:26:04 -05:00
Notify user when registering/unregistering module/integration
Former-commit-id: 51fdcbc6cc46717dd598ac5aefddc54aefa2d897
This commit is contained in:
1 parent
63bcdb52da
commit
031acae774
2 files changed
+7
-2
No files matched your search
@@ -85,7 +85,8 @@ public class IntegrationHelper extends QuickShopInstanceHolder {
|
||||
throw new InvalidIntegratedPluginClass("Invaild Integration module: " + integratedPlugin.getName());
|
||||
}
|
||||
if (!integrations.containsKey(integratedPlugin.getName())) {
|
||||
Util.debugLog("Registering " + integratedPlugin.getName());
|
||||
plugin.getLogger().info("Registering " + integratedPlugin.getName() + " integration");
|
||||
Util.debugLog("Registering " + integratedPlugin.getName() + " integration");
|
||||
integrations.put(integratedPlugin.getName(), integratedPlugin);
|
||||
}
|
||||
}
|
||||
@@ -129,7 +130,8 @@ public class IntegrationHelper extends QuickShopInstanceHolder {
|
||||
return;
|
||||
}
|
||||
|
||||
Util.debugLog("Unregistering " + integratedPlugin.getName());
|
||||
plugin.getLogger().info("Unregistering " + integratedPlugin.getName() + " integration");
|
||||
Util.debugLog("Unregistering " + integratedPlugin.getName() + " integration");
|
||||
integrations.remove(integratedPlugin.getName());
|
||||
}
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ public class CompatibilityManager extends QuickShopInstanceHolder {
|
||||
|
||||
public void register(@NotNull CompatibilityModule module) {
|
||||
if (!registeredModules.containsKey(module.getName())) {
|
||||
plugin.getLogger().info("Registering " + module.getName() + " Compatibility Module");
|
||||
registeredModules.put(module.getName(), module);
|
||||
}
|
||||
}
|
||||
@@ -97,10 +98,12 @@ public class CompatibilityManager extends QuickShopInstanceHolder {
|
||||
}
|
||||
|
||||
public void unregister(@NotNull String moduleName) {
|
||||
plugin.getLogger().info("Unregistering " + moduleName + " compatibility module");
|
||||
registeredModules.remove(moduleName);
|
||||
}
|
||||
|
||||
public void unregister(@NotNull CompatibilityModule module) {
|
||||
plugin.getLogger().info("Unregistering " + module.getName() + " compatibility module");
|
||||
registeredModules.remove(module.getName());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user