Skip to content

Commit

Permalink
Fix constructor mess
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Nov 11, 2024
1 parent b45ec48 commit 7d227ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@
* This interface is for external server plugins.
*/
public non-sealed abstract class ExternalPlugin extends Plugin implements ExtensionPoint {
protected ExternalPlugin(Class<?> pluginClass) {
super(PluginInfo.fromClassLoader(pluginClass));
}
}
6 changes: 6 additions & 0 deletions server/src/main/java/com/soulfiremc/server/api/Plugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ protected Plugin(PluginInfo pluginInfo) {
register();
}

protected Plugin() {
this.pluginInfo = PluginInfo.fromClassLoader(getClass());

register();
}

protected void register() {
SoulFireAPI.registerListenersOfClass(getClass());
SoulFireAPI.registerListenersOfObject(this);
Expand Down

0 comments on commit 7d227ed

Please sign in to comment.