-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it compile for Bukkit/Paper 1.20.4.
- Loading branch information
Jan Boerman
committed
Feb 12, 2024
1 parent
e517a8e
commit 1ef7a5f
Showing
7 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...er/src/main/java/xyz/janboerman/scalaloader/paper/plugin/ScalaPluginBootstrapContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,37 @@ | ||
package xyz.janboerman.scalaloader.paper.plugin; | ||
|
||
import io.papermc.paper.plugin.bootstrap.BootstrapContext; | ||
import io.papermc.paper.plugin.configuration.PluginMeta; | ||
import io.papermc.paper.plugin.lifecycle.event.LifecycleEventManager; | ||
import io.papermc.paper.plugin.lifecycle.event.handler.configuration.LifecycleEventHandlerConfiguration; | ||
import xyz.janboerman.scalaloader.plugin.ScalaPluginDescription; | ||
|
||
import java.io.File; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class ScalaPluginBootstrapContext extends ScalaPluginProviderContext implements BootstrapContext { | ||
|
||
private final LifecycleEventManager<BootstrapContext> lifecycleEventManager = new LifecycleEventManager<BootstrapContext>() { | ||
@Override | ||
public void registerEventHandler( | ||
@NotNull LifecycleEventHandlerConfiguration<? super BootstrapContext> handlerConfiguration) { | ||
//TODO this is currently not called. when should this be called? should it be called at all? | ||
} | ||
}; | ||
|
||
|
||
public ScalaPluginBootstrapContext(File pluginJarFile, ScalaPluginDescription description) { | ||
super(pluginJarFile, description); | ||
} | ||
|
||
@Override | ||
public @NotNull LifecycleEventManager<BootstrapContext> getLifecycleManager() { | ||
return lifecycleEventManager; | ||
} | ||
|
||
@Override | ||
public @NotNull PluginMeta getPluginMeta() { | ||
return getConfiguration(); | ||
} | ||
} |