update dependencies

This commit is contained in:
moehreag 2024-06-16 14:53:45 +02:00
parent 565e4df74e
commit a3960b933f
3 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
[versions]
thyroxine = "0.0.1-alpha.2"
thyroxine = "0.0.1-alpha.3"
nightconfig = "3.7.2"
mixin = "0.14.0+mixin.0.8.6"
annotations = "24.1.0"

View file

@ -1,6 +1,6 @@
plugins {
java
id("dev.frogmc.phytotelma") version "0.0.1-alpha.9"
id("dev.frogmc.phytotelma") version "0.0.1-alpha.10"
}
repositories {

View file

@ -84,9 +84,9 @@ public class PluginLoader {
public static GamePlugin discoverGamePlugins() {
LOGGER.info("Discovering game plugins...");
ServiceLoader<GamePlugin> loader = ServiceLoader.load(GamePlugin.class);
loader.stream().map(ServiceLoader.Provider::get).forEach(p -> LOGGER.info("Found game plugin: {}", p.getClass().getName()));
GamePlugin[] applicablePlugins = ServiceLoader.load(GamePlugin.class).stream().map(ServiceLoader.Provider::get).filter(GamePlugin::isApplicable).toArray(GamePlugin[]::new);
GamePlugin[] applicablePlugins = ServiceLoader.load(GamePlugin.class).stream().map(ServiceLoader.Provider::get)
.peek(p -> LOGGER.debug("Found game plugin: {}", p.getClass().getName()))
.filter(GamePlugin::isApplicable).toArray(GamePlugin[]::new);
if (applicablePlugins.length > 1) {
throw new IllegalStateException("Multiple applicable game plugins found!");
} else if (applicablePlugins.length == 0) {