-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
65 additions
and
61 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
Binary file not shown.
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
29 changes: 5 additions & 24 deletions
29
origins/src/main/java/io/github/dueris/originspaper/Bootstrap.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,35 +1,16 @@ | ||
package io.github.dueris.originspaper; | ||
|
||
import io.papermc.paper.plugin.bootstrap.BootstrapContext; | ||
import io.papermc.paper.plugin.bootstrap.PluginBootstrap; | ||
import me.dueris.eclipse.ignite.IgniteBootstrap; | ||
import io.github.dueris.eclipse.api.entrypoint.BootstrapInitializer; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
@SuppressWarnings("UnstableApiUsage") | ||
public class Bootstrap implements PluginBootstrap { | ||
public class Bootstrap implements BootstrapInitializer { | ||
|
||
private static final Logger log = LogManager.getLogger(Bootstrap.class); | ||
|
||
private static boolean igniteBooted() { | ||
try { | ||
Class.forName("me.dueris.eclipse.ignite.IgniteBootstrap"); | ||
return IgniteBootstrap.BOOTED.get(); | ||
} catch (ClassNotFoundException e) { | ||
log.error("Eclipse was not found in classpath! Please install from modrinth : {}", "https://modrinth.com/plugin/eclipse-mixin"); | ||
return false; | ||
} | ||
} | ||
|
||
@Override | ||
public void bootstrap(@NotNull BootstrapContext bootContext) { | ||
try { | ||
if (!igniteBooted()) return; | ||
OriginsPaper.initialize(bootContext); | ||
} catch (Throwable e) { | ||
throw new RuntimeException("An error occurred when loading OriginsPaper!", e); | ||
} | ||
public void onInitializeBootstrap() { | ||
// Eclipse entrypoint. | ||
OriginsPaper.initialize(); | ||
} | ||
|
||
} |
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
16 changes: 16 additions & 0 deletions
16
origins/src/main/java/io/github/dueris/originspaper/plugin/PaperPluginBootstrap.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.github.dueris.originspaper.plugin; | ||
|
||
import io.github.dueris.originspaper.OriginsPaper; | ||
import io.papermc.paper.plugin.bootstrap.BootstrapContext; | ||
import io.papermc.paper.plugin.bootstrap.PluginBootstrap; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
@SuppressWarnings("UnstableApiUsage") | ||
public class PaperPluginBootstrap implements PluginBootstrap { | ||
|
||
@Override | ||
public void bootstrap(@NotNull BootstrapContext bootstrapContext) { | ||
// Register commands via lifecycle event system. | ||
OriginsPaper.registerCommands(bootstrapContext); | ||
} | ||
} |
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