Merge pull request #105 from Protonull/master

Fix missing field bug
This commit is contained in:
TheMode 2021-01-16 00:13:43 +01:00 committed by GitHub
commit ada1e49d3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,7 +193,7 @@ public class ExtensionManager {
// Set extension description
try {
Field descriptionField = extensionClass.getSuperclass().getDeclaredField("description");
Field descriptionField = Extension.class.getDeclaredField("description");
descriptionField.setAccessible(true);
descriptionField.set(extension, extensionDescription);
} catch (IllegalAccessException e) {
@ -205,7 +205,7 @@ public class ExtensionManager {
// Set logger
try {
Field loggerField = extensionClass.getSuperclass().getDeclaredField("logger");
Field loggerField = Extension.class.getDeclaredField("logger");
loggerField.setAccessible(true);
loggerField.set(extension, LoggerFactory.getLogger(extensionClass));
} catch (IllegalAccessException e) {