mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 01:49:49 -05:00
Fix helper cannot get annotation
Former-commit-id: 833e0b7967194fd1ce64ad156cffe85487dafe10
This commit is contained in:
1 parent
b143ff13e0
commit
e4c4643bea
1 file changed
+6
-2
@@ -36,6 +36,7 @@ public class IntegrationHelper {
|
||||
if (!isIntegrationClass(clazz)) {
|
||||
throw new InvaildIntegratedPluginClass();
|
||||
}
|
||||
Util.debugLog("Registering "+clazz.getName());
|
||||
integrations.add(clazz);
|
||||
|
||||
}
|
||||
@@ -44,12 +45,14 @@ public class IntegrationHelper {
|
||||
if (!isIntegrationClass(clazz)) {
|
||||
throw new InvaildIntegratedPluginClass();
|
||||
}
|
||||
Util.debugLog("Unregistering "+clazz.getName());
|
||||
integrations.remove(clazz);
|
||||
}
|
||||
|
||||
public void callIntegrationsLoad(@NotNull IntegrateStage stage) {
|
||||
integrations.forEach(integratedPlugin -> {
|
||||
if (integratedPlugin.getClass().getAnnotation(IntegrationStage.class).loadStage() == stage) {
|
||||
if (integratedPlugin.getClass().getDeclaredAnnotation(IntegrationStage.class).loadStage() == stage) {
|
||||
Util.debugLog("Calling for load "+integratedPlugin.getName());
|
||||
integratedPlugin.load();
|
||||
}
|
||||
});
|
||||
@@ -57,7 +60,8 @@ public class IntegrationHelper {
|
||||
|
||||
public void callIntegrationsUnload(@NotNull IntegrateStage stage) {
|
||||
integrations.forEach(integratedPlugin -> {
|
||||
if (integratedPlugin.getClass().getAnnotation(IntegrationStage.class).loadStage() == stage) {
|
||||
if (integratedPlugin.getClass().getDeclaredAnnotation(IntegrationStage.class).loadStage() == stage) {
|
||||
Util.debugLog("Calling for unload "+integratedPlugin.getName());
|
||||
integratedPlugin.unload();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user