mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Log message if plugin bootstrap provided external plugin instead of throwing an exception (#8914)
This commit is contained in:
parent
7fceedc84f
commit
81f79b407d
1 changed files with 1 additions and 2 deletions
|
@ -5592,9 +5592,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ plugin = bootstrap.createPlugin(PaperPluginParent.this.context);
|
||||
+ }
|
||||
+
|
||||
+ // Don't allow plugins to load plugins other than the one defined in main. This restriction might not be necessary.
|
||||
+ if (!plugin.getClass().isAssignableFrom(Class.forName(PaperPluginParent.this.description.getMainClass(), true, plugin.getClass().getClassLoader()))) {
|
||||
+ throw new IllegalArgumentException("Plugin provided must be the same type as main defined in plugin configuration!");
|
||||
+ logger.info("Bootstrap of plugin " + PaperPluginParent.this.description.getName() + " provided a plugin instance of class " + plugin.getClass().getName() + " which does not match the plugin declared main class");
|
||||
+ }
|
||||
+
|
||||
+ this.status = ProviderStatus.INITIALIZED;
|
||||
|
|
Loading…
Reference in a new issue