diff --git a/ap/src/main/java/org/geysermc/geyser/processor/BlockEntityProcessor.java b/ap/src/main/java/org/geysermc/geyser/processor/BlockEntityProcessor.java index f9ba68302..ccdaeda4e 100644 --- a/ap/src/main/java/org/geysermc/geyser/processor/BlockEntityProcessor.java +++ b/ap/src/main/java/org/geysermc/geyser/processor/BlockEntityProcessor.java @@ -30,7 +30,7 @@ import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; @SupportedAnnotationTypes("*") -@SupportedSourceVersion(SourceVersion.RELEASE_16) +@SupportedSourceVersion(SourceVersion.RELEASE_17) public class BlockEntityProcessor extends ClassProcessor { public BlockEntityProcessor() { super("org.geysermc.geyser.translator.level.block.entity.BlockEntity"); diff --git a/ap/src/main/java/org/geysermc/geyser/processor/CollisionRemapperProcessor.java b/ap/src/main/java/org/geysermc/geyser/processor/CollisionRemapperProcessor.java index 84e2e2ffd..30d94b7f5 100644 --- a/ap/src/main/java/org/geysermc/geyser/processor/CollisionRemapperProcessor.java +++ b/ap/src/main/java/org/geysermc/geyser/processor/CollisionRemapperProcessor.java @@ -30,7 +30,7 @@ import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; @SupportedAnnotationTypes("*") -@SupportedSourceVersion(SourceVersion.RELEASE_16) +@SupportedSourceVersion(SourceVersion.RELEASE_17) public class CollisionRemapperProcessor extends ClassProcessor { public CollisionRemapperProcessor() { super("org.geysermc.geyser.translator.collision.CollisionRemapper"); diff --git a/ap/src/main/java/org/geysermc/geyser/processor/PacketTranslatorProcessor.java b/ap/src/main/java/org/geysermc/geyser/processor/PacketTranslatorProcessor.java index 9b99d679b..d538a9ca1 100644 --- a/ap/src/main/java/org/geysermc/geyser/processor/PacketTranslatorProcessor.java +++ b/ap/src/main/java/org/geysermc/geyser/processor/PacketTranslatorProcessor.java @@ -30,7 +30,7 @@ import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; @SupportedAnnotationTypes("*") -@SupportedSourceVersion(SourceVersion.RELEASE_16) +@SupportedSourceVersion(SourceVersion.RELEASE_17) public class PacketTranslatorProcessor extends ClassProcessor { public PacketTranslatorProcessor() { super("org.geysermc.geyser.translator.protocol.Translator"); diff --git a/ap/src/main/java/org/geysermc/geyser/processor/SoundHandlerProcessor.java b/ap/src/main/java/org/geysermc/geyser/processor/SoundHandlerProcessor.java index c35c0ee4e..30ceef2c6 100644 --- a/ap/src/main/java/org/geysermc/geyser/processor/SoundHandlerProcessor.java +++ b/ap/src/main/java/org/geysermc/geyser/processor/SoundHandlerProcessor.java @@ -30,7 +30,7 @@ import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; @SupportedAnnotationTypes("*") -@SupportedSourceVersion(SourceVersion.RELEASE_16) +@SupportedSourceVersion(SourceVersion.RELEASE_17) public class SoundHandlerProcessor extends ClassProcessor { public SoundHandlerProcessor() { super("org.geysermc.geyser.translator.sound.SoundTranslator"); diff --git a/bootstrap/bungeecord/build.gradle.kts b/bootstrap/bungeecord/build.gradle.kts index e95ddd618..b29599246 100644 --- a/bootstrap/bungeecord/build.gradle.kts +++ b/bootstrap/bungeecord/build.gradle.kts @@ -3,7 +3,7 @@ dependencies { implementation(libs.adventure.text.serializer.bungeecord) - implementation("org.geysermc.floodgate", "bungee", "2.2.0-SNAPSHOT") + implementation(libs.floodgate.bungee) } platformRelocate("net.md_5.bungee.jni") diff --git a/bootstrap/bungeecord/src/main/java/org/geysermc/geyser/platform/bungeecord/GeyserBungeePlugin.java b/bootstrap/bungeecord/src/main/java/org/geysermc/geyser/platform/bungeecord/GeyserBungeePlugin.java index a4531afcb..9569b5aaa 100644 --- a/bootstrap/bungeecord/src/main/java/org/geysermc/geyser/platform/bungeecord/GeyserBungeePlugin.java +++ b/bootstrap/bungeecord/src/main/java/org/geysermc/geyser/platform/bungeecord/GeyserBungeePlugin.java @@ -31,9 +31,9 @@ import net.md_5.bungee.api.config.ListenerInfo; import net.md_5.bungee.api.plugin.Plugin; import net.md_5.bungee.protocol.ProtocolConstants; import org.checkerframework.checker.nullness.qual.Nullable; -import org.geysermc.floodgate.BungeePlatform; -import org.geysermc.floodgate.pluginmessage.BungeeSkinApplier; -import org.geysermc.floodgate.skin.SkinApplier; +import org.geysermc.floodgate.bungee.BungeePlatform; +import org.geysermc.floodgate.bungee.pluginmessage.BungeeSkinApplier; +import org.geysermc.floodgate.core.skin.SkinApplier; import org.geysermc.geyser.GeyserBootstrap; import org.geysermc.geyser.GeyserImpl; import org.geysermc.geyser.api.command.Command; @@ -307,7 +307,8 @@ public class GeyserBungeePlugin extends Plugin implements GeyserBootstrap { @Override public SkinApplier createSkinApplier() { - new BungeePlatform(this); // TODO hack to ensure ReflectionUtils prefix is applied and I don't forget about dealing with it - return new BungeeSkinApplier(null); // Also TODO +// new BungeePlatform(this); // TODO hack to ensure ReflectionUtils prefix is applied and I don't forget about dealing with it +// return new BungeeSkinApplier(null); // Also TODO + return null; } } diff --git a/bootstrap/fabric/src/main/java/org/geysermc/geyser/platform/fabric/GeyserFabricMod.java b/bootstrap/fabric/src/main/java/org/geysermc/geyser/platform/fabric/GeyserFabricMod.java index 64a0c356f..c69918c58 100644 --- a/bootstrap/fabric/src/main/java/org/geysermc/geyser/platform/fabric/GeyserFabricMod.java +++ b/bootstrap/fabric/src/main/java/org/geysermc/geyser/platform/fabric/GeyserFabricMod.java @@ -116,7 +116,7 @@ public class GeyserFabricMod implements ModInitializer, GeyserBootstrap { GeyserConfiguration.checkGeyserConfiguration(geyserConfig, geyserLogger); - this.geyser = GeyserImpl.load(PlatformType.FABRIC, this); + this.geyser = GeyserImpl.load(PlatformType.FABRIC, this, null); if (server == null) { // Server has yet to start diff --git a/bootstrap/spigot/build.gradle.kts b/bootstrap/spigot/build.gradle.kts index 29df5d449..894979af1 100644 --- a/bootstrap/spigot/build.gradle.kts +++ b/bootstrap/spigot/build.gradle.kts @@ -9,20 +9,11 @@ dependencies { implementation(libs.commodore) implementation(libs.adventure.text.serializer.bungeecord) - - // Both folia-api and paper-mojangapi only provide Java 17 versions for 1.19 - compileOnly(libs.folia.api) { - attributes { - attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17) - } - } - compileOnly(libs.paper.mojangapi) { - attributes { - attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17) - } - } - implementation("org.geysermc.floodgate", "spigot", "2.2.0-SNAPSHOT") + compileOnly(libs.folia.api) + compileOnly(libs.paper.mojangapi) + + implementation(libs.floodgate.spigot) } platformRelocate("it.unimi.dsi.fastutil") diff --git a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserSpigotPlugin.java b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserSpigotPlugin.java index 45ea574fc..deca0e3a2 100644 --- a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserSpigotPlugin.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/GeyserSpigotPlugin.java @@ -42,9 +42,7 @@ import org.bukkit.permissions.Permission; import org.bukkit.permissions.PermissionDefault; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.java.JavaPlugin; -import org.geysermc.floodgate.pluginmessage.SpigotSkinApplier; -import org.geysermc.floodgate.skin.SkinApplier; -import org.geysermc.floodgate.util.SpigotVersionSpecificMethods; +import org.geysermc.floodgate.core.skin.SkinApplier; import org.geysermc.geyser.Constants; import org.geysermc.geyser.GeyserBootstrap; import org.geysermc.geyser.GeyserImpl; @@ -431,7 +429,8 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap { @Override public SkinApplier createSkinApplier() { - return new SpigotSkinApplier(new SpigotVersionSpecificMethods(this), this); +// return new SpigotSkinApplier(new SpigotVersionSpecificMethods(this), this); + return null; } /** diff --git a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/SpigotHybridChannelHandler.java b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/SpigotHybridChannelHandler.java index acfd30f40..384f71bed 100644 --- a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/SpigotHybridChannelHandler.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/SpigotHybridChannelHandler.java @@ -29,13 +29,13 @@ import com.mojang.authlib.GameProfile; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; -import org.geysermc.floodgate.util.ClassNames; +import org.geysermc.floodgate.spigot.util.ClassNames; import org.geysermc.geyser.hybrid.IntegratedHybridProvider; import org.geysermc.geyser.session.GeyserSession; import javax.annotation.Nonnull; -import static org.geysermc.floodgate.util.ReflectionUtils.setValue; +import static org.geysermc.floodgate.core.util.ReflectionUtils.setValue; @ChannelHandler.Sharable public final class SpigotHybridChannelHandler extends ChannelInboundHandlerAdapter { diff --git a/bootstrap/velocity/build.gradle.kts b/bootstrap/velocity/build.gradle.kts index ae5d7f5b8..0e2d210f4 100644 --- a/bootstrap/velocity/build.gradle.kts +++ b/bootstrap/velocity/build.gradle.kts @@ -1,6 +1,6 @@ dependencies { annotationProcessor(libs.velocity.api) - implementation("org.geysermc.floodgate", "velocity", "2.2.0-SNAPSHOT") + implementation(libs.floodgate.velocity) api(projects.core) } diff --git a/bootstrap/velocity/src/main/java/org/geysermc/geyser/platform/velocity/GeyserVelocityPlugin.java b/bootstrap/velocity/src/main/java/org/geysermc/geyser/platform/velocity/GeyserVelocityPlugin.java index d88512b95..54c02e47b 100644 --- a/bootstrap/velocity/src/main/java/org/geysermc/geyser/platform/velocity/GeyserVelocityPlugin.java +++ b/bootstrap/velocity/src/main/java/org/geysermc/geyser/platform/velocity/GeyserVelocityPlugin.java @@ -37,7 +37,7 @@ import com.velocitypowered.api.plugin.Plugin; import com.velocitypowered.api.proxy.ProxyServer; import lombok.Getter; import net.kyori.adventure.util.Codec; -import org.geysermc.floodgate.FloodgatePlatform; +import org.geysermc.floodgate.core.FloodgatePlatform; import org.geysermc.geyser.GeyserBootstrap; import org.geysermc.geyser.GeyserImpl; import org.geysermc.geyser.api.command.Command; diff --git a/bootstrap/velocity/src/main/java/org/geysermc/geyser/platform/velocity/floodgate/FloodgateVelocityPlatform.java b/bootstrap/velocity/src/main/java/org/geysermc/geyser/platform/velocity/floodgate/FloodgateVelocityPlatform.java index e9ca5458c..290304a74 100644 --- a/bootstrap/velocity/src/main/java/org/geysermc/geyser/platform/velocity/floodgate/FloodgateVelocityPlatform.java +++ b/bootstrap/velocity/src/main/java/org/geysermc/geyser/platform/velocity/floodgate/FloodgateVelocityPlatform.java @@ -25,22 +25,21 @@ package org.geysermc.geyser.platform.velocity.floodgate; -import com.google.inject.Module; -import org.geysermc.floodgate.VelocityPlatform; -import org.geysermc.geyser.GeyserImpl; -import org.geysermc.geyser.floodgate.GeyserLoadStage; - -import java.nio.file.Paths; -import java.util.List; +import org.geysermc.floodgate.isolation.library.LibraryManager; +import org.geysermc.floodgate.velocity.VelocityPlatform; public class FloodgateVelocityPlatform extends VelocityPlatform { - @Override - protected List loadStageModules() { - // Geyser being a dumb dumb - super.dataDirectory = Paths.get("plugins/" + GeyserImpl.NAME + "-Velocity/"); - - var loaded = super.loadStageModules(); - loaded.add(new GeyserLoadStage()); - return loaded; + public FloodgateVelocityPlatform(LibraryManager manager) { + super(manager); } + +// @Override +// protected List loadStageModules() { +// // Geyser being a dumb dumb +// super.dataDirectory = Paths.get("plugins/" + GeyserImpl.NAME + "-Velocity/"); +// +// var loaded = super.loadStageModules(); +// loaded.add(new GeyserLoadStage()); +// return loaded; +// } } diff --git a/build-logic/src/main/kotlin/geyser.base-conventions.gradle.kts b/build-logic/src/main/kotlin/geyser.base-conventions.gradle.kts index 709867300..20d678cac 100644 --- a/build-logic/src/main/kotlin/geyser.base-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/geyser.base-conventions.gradle.kts @@ -16,7 +16,7 @@ indra { mitLicense() javaVersions { - target(16) + target(17) } } diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 41426ae48..310dc42af 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -7,7 +7,8 @@ plugins { } dependencies { - api("org.geysermc.floodgate", "core", "2.2.0-SNAPSHOT") + api(libs.floodgate.core) + annotationProcessor(libs.floodgate.core) api(projects.api) // Jackson JSON and YAML serialization diff --git a/core/src/main/java/org/geysermc/geyser/GeyserBootstrap.java b/core/src/main/java/org/geysermc/geyser/GeyserBootstrap.java index 57fe99c9d..fb294f1de 100644 --- a/core/src/main/java/org/geysermc/geyser/GeyserBootstrap.java +++ b/core/src/main/java/org/geysermc/geyser/GeyserBootstrap.java @@ -25,7 +25,7 @@ package org.geysermc.geyser; -import org.geysermc.floodgate.skin.SkinApplier; +import org.geysermc.floodgate.core.skin.SkinApplier; import org.geysermc.geyser.command.GeyserCommandManager; import org.geysermc.geyser.configuration.GeyserConfiguration; import org.geysermc.geyser.dump.BootstrapDumpInfo; diff --git a/core/src/main/java/org/geysermc/geyser/GeyserImpl.java b/core/src/main/java/org/geysermc/geyser/GeyserImpl.java index bbf0bc578..fab13102b 100644 --- a/core/src/main/java/org/geysermc/geyser/GeyserImpl.java +++ b/core/src/main/java/org/geysermc/geyser/GeyserImpl.java @@ -46,7 +46,7 @@ import org.geysermc.api.Geyser; import org.geysermc.cumulus.form.Form; import org.geysermc.cumulus.form.util.FormBuilder; import org.geysermc.erosion.packet.Packets; -import org.geysermc.floodgate.FloodgatePlatform; +import org.geysermc.floodgate.core.FloodgatePlatform; import org.geysermc.floodgate.news.NewsItemAction; import org.geysermc.geyser.api.GeyserApi; import org.geysermc.geyser.api.event.EventBus; diff --git a/core/src/main/java/org/geysermc/geyser/extension/GeyserExtensionDescription.java b/core/src/main/java/org/geysermc/geyser/extension/GeyserExtensionDescription.java index 716b763f5..239ffc450 100644 --- a/core/src/main/java/org/geysermc/geyser/extension/GeyserExtensionDescription.java +++ b/core/src/main/java/org/geysermc/geyser/extension/GeyserExtensionDescription.java @@ -31,6 +31,7 @@ import org.checkerframework.checker.nullness.qual.NonNull; import org.geysermc.geyser.api.extension.ExtensionDescription; import org.geysermc.geyser.api.extension.exception.InvalidDescriptionException; import org.geysermc.geyser.text.GeyserLocale; +import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor; @@ -48,7 +49,7 @@ public record GeyserExtensionDescription(@NonNull String id, @NonNull String version, @NonNull List authors) implements ExtensionDescription { - private static final Yaml YAML = new Yaml(new CustomClassLoaderConstructor(Source.class.getClassLoader())); + private static final Yaml YAML = new Yaml(new CustomClassLoaderConstructor(Source.class.getClassLoader(), new LoaderOptions())); public static final Pattern ID_PATTERN = Pattern.compile("[a-z][a-z0-9-_]{0,63}"); public static final Pattern NAME_PATTERN = Pattern.compile("^[A-Za-z_.-]+$"); diff --git a/core/src/main/java/org/geysermc/geyser/floodgate/GeyserLoadStage.java b/core/src/main/java/org/geysermc/geyser/floodgate/GeyserLoadStage.java index f0551f76e..8c94caa28 100644 --- a/core/src/main/java/org/geysermc/geyser/floodgate/GeyserLoadStage.java +++ b/core/src/main/java/org/geysermc/geyser/floodgate/GeyserLoadStage.java @@ -25,16 +25,11 @@ package org.geysermc.geyser.floodgate; -import com.google.inject.AbstractModule; -import com.google.inject.Provides; -import com.google.inject.Singleton; -import com.google.inject.name.Named; - -public class GeyserLoadStage extends AbstractModule { - @Provides - @Singleton - @Named("configFile") - private String floodgateConfigName() { - return "floodgate.yml"; - } +public class GeyserLoadStage { +// @Provides +// @Singleton +// @Named("configFile") +// private String floodgateConfigName() { +// return "floodgate.yml"; +// } } diff --git a/core/src/main/java/org/geysermc/geyser/hybrid/FloodgateHybridProvider.java b/core/src/main/java/org/geysermc/geyser/hybrid/FloodgateHybridProvider.java index f67d95a09..b2741bc52 100644 --- a/core/src/main/java/org/geysermc/geyser/hybrid/FloodgateHybridProvider.java +++ b/core/src/main/java/org/geysermc/geyser/hybrid/FloodgateHybridProvider.java @@ -25,7 +25,7 @@ package org.geysermc.geyser.hybrid; -import org.geysermc.floodgate.crypto.FloodgateCipher; +import org.geysermc.floodgate.core.crypto.FloodgateCipher; import org.geysermc.geyser.GeyserImpl; import org.geysermc.geyser.session.GeyserSession; @@ -35,7 +35,7 @@ public final class FloodgateHybridProvider implements HybridProvider { private final FloodgateCipher cipher; public FloodgateHybridProvider(GeyserImpl geyser) { - cipher = geyser.getFloodgatePlatform().getInstance(FloodgateCipher.class); + cipher = geyser.getFloodgatePlatform().getBean(FloodgateCipher.class); } @Override diff --git a/core/src/main/java/org/geysermc/geyser/hybrid/HybridProvider.java b/core/src/main/java/org/geysermc/geyser/hybrid/HybridProvider.java index e84f81cb1..f291f8fbe 100644 --- a/core/src/main/java/org/geysermc/geyser/hybrid/HybridProvider.java +++ b/core/src/main/java/org/geysermc/geyser/hybrid/HybridProvider.java @@ -25,7 +25,7 @@ package org.geysermc.geyser.hybrid; -import org.geysermc.floodgate.crypto.FloodgateCipher; +import org.geysermc.floodgate.core.crypto.FloodgateCipher; import org.geysermc.geyser.session.GeyserSession; public interface HybridProvider { diff --git a/core/src/main/java/org/geysermc/geyser/hybrid/IntegratedHybridProvider.java b/core/src/main/java/org/geysermc/geyser/hybrid/IntegratedHybridProvider.java index 6b4dff7a5..60b09dd5e 100644 --- a/core/src/main/java/org/geysermc/geyser/hybrid/IntegratedHybridProvider.java +++ b/core/src/main/java/org/geysermc/geyser/hybrid/IntegratedHybridProvider.java @@ -26,9 +26,9 @@ package org.geysermc.geyser.hybrid; import io.netty.util.AttributeKey; -import org.geysermc.floodgate.crypto.FloodgateCipher; -import org.geysermc.floodgate.skin.SkinApplier; -import org.geysermc.floodgate.skin.SkinData; +import org.geysermc.floodgate.core.crypto.FloodgateCipher; +import org.geysermc.floodgate.core.skin.SkinApplier; +import org.geysermc.floodgate.core.skin.SkinDataImpl; import org.geysermc.geyser.GeyserImpl; import org.geysermc.geyser.session.GeyserSession; @@ -44,7 +44,7 @@ public class IntegratedHybridProvider implements HybridProvider { @Override public void onSkinUpload(GeyserSession session, String value, String signature) { - skinApplier.applySkin(session, new SkinData(value, signature)); + skinApplier.applySkin(session, new SkinDataImpl(value, signature)); } @Override diff --git a/core/src/main/java/org/geysermc/geyser/hybrid/ProxyHybridProvider.java b/core/src/main/java/org/geysermc/geyser/hybrid/ProxyHybridProvider.java index 0bc9d9d50..22bde0bc3 100644 --- a/core/src/main/java/org/geysermc/geyser/hybrid/ProxyHybridProvider.java +++ b/core/src/main/java/org/geysermc/geyser/hybrid/ProxyHybridProvider.java @@ -25,7 +25,7 @@ package org.geysermc.geyser.hybrid; -import org.geysermc.floodgate.crypto.FloodgateCipher; +import org.geysermc.floodgate.core.crypto.FloodgateCipher; import org.geysermc.geyser.GeyserImpl; public final class ProxyHybridProvider extends IntegratedHybridProvider { @@ -33,7 +33,7 @@ public final class ProxyHybridProvider extends IntegratedHybridProvider { public ProxyHybridProvider(GeyserImpl geyser) { super(geyser); - this.cipher = geyser.getFloodgatePlatform().getInstance(FloodgateCipher.class); + this.cipher = geyser.getFloodgatePlatform().getBean(FloodgateCipher.class); } @Override diff --git a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java index b5da237fd..eddc2d8e6 100644 --- a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java +++ b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java @@ -96,7 +96,7 @@ import org.geysermc.api.util.InputMode; import org.geysermc.api.util.UiProfile; import org.geysermc.cumulus.form.Form; import org.geysermc.cumulus.form.util.FormBuilder; -import org.geysermc.floodgate.crypto.FloodgateCipher; +import org.geysermc.floodgate.core.crypto.FloodgateCipher; import org.geysermc.floodgate.util.BedrockData; import org.geysermc.geyser.Constants; import org.geysermc.geyser.GeyserImpl; diff --git a/core/src/main/java/org/geysermc/geyser/skin/BedrockSkinUploader.java b/core/src/main/java/org/geysermc/geyser/skin/BedrockSkinUploader.java index 5b98c004a..311a87820 100644 --- a/core/src/main/java/org/geysermc/geyser/skin/BedrockSkinUploader.java +++ b/core/src/main/java/org/geysermc/geyser/skin/BedrockSkinUploader.java @@ -32,7 +32,7 @@ import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import com.nimbusds.jwt.SignedJWT; import lombok.Getter; -import org.geysermc.floodgate.util.WebsocketEventType; +import org.geysermc.floodgate.core.util.WebsocketEventType; import org.geysermc.geyser.Constants; import org.geysermc.geyser.GeyserImpl; import org.geysermc.geyser.GeyserLogger; diff --git a/core/src/main/java/org/geysermc/geyser/util/LoginEncryptionUtils.java b/core/src/main/java/org/geysermc/geyser/util/LoginEncryptionUtils.java index dd523df5a..77db078d9 100644 --- a/core/src/main/java/org/geysermc/geyser/util/LoginEncryptionUtils.java +++ b/core/src/main/java/org/geysermc/geyser/util/LoginEncryptionUtils.java @@ -32,13 +32,10 @@ import com.fasterxml.jackson.databind.node.JsonNodeType; import com.github.steveice10.mc.auth.service.MsaAuthenticationService; import com.nimbusds.jose.JWSObject; import com.nimbusds.jose.Payload; -import com.nimbusds.jose.shaded.json.JSONObject; -import com.nimbusds.jose.shaded.json.JSONValue; import com.nimbusds.jwt.SignedJWT; import org.cloudburstmc.protocol.bedrock.packet.LoginPacket; import org.cloudburstmc.protocol.bedrock.packet.ServerToClientHandshakePacket; import org.cloudburstmc.protocol.bedrock.util.EncryptionUtils; -import org.cloudburstmc.protocol.common.util.Preconditions; import org.geysermc.cumulus.form.CustomForm; import org.geysermc.cumulus.form.ModalForm; import org.geysermc.cumulus.form.SimpleForm; @@ -109,12 +106,12 @@ public class LoginEncryptionUtils { mojangSigned = true; } - Object payload = JSONValue.parse(jwt.getPayload().toString()); - Preconditions.checkArgument(payload instanceof JSONObject, "Payload is not an object"); - - Object identityPublicKey = ((JSONObject) payload).get("identityPublicKey"); - Preconditions.checkArgument(identityPublicKey instanceof String, "identityPublicKey node is missing in chain"); - lastKey = EncryptionUtils.generateKey((String) identityPublicKey); +// Object payload = JSONValue.parse(jwt.getPayload().toString()); +// Preconditions.checkArgument(payload instanceof JSONObject, "Payload is not an object"); +// +// Object identityPublicKey = ((JSONObject) payload).get("identityPublicKey"); +// Preconditions.checkArgument(identityPublicKey instanceof String, "identityPublicKey node is missing in chain"); +// lastKey = EncryptionUtils.generateKey((String) identityPublicKey); } return mojangSigned; diff --git a/core/src/main/resources/mappings b/core/src/main/resources/mappings index 56c3eee7a..d449a0a18 160000 --- a/core/src/main/resources/mappings +++ b/core/src/main/resources/mappings @@ -1 +1 @@ -Subproject commit 56c3eee7a5241b5609d1936f2a11b05dd1a3d568 +Subproject commit d449a0a18549f1b6f2a62e363974019337a26b16 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f0873a245..c9b93b040 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,6 @@ [versions] -base-api = "1.0.0-SNAPSHOT" +base-api = "feature-floodgate-merge-1.0.0-SNAPSHOT" +floodgate = "development-2.2.2-SNAPSHOT" cumulus = "1.1.1" erosion = "1.0-20230406.174837-8" events = "1.0-SNAPSHOT" @@ -37,6 +38,11 @@ base-api = { group = "org.geysermc.api", name = "base-api", version.ref = "base- cumulus = { group = "org.geysermc.cumulus", name = "cumulus", version.ref = "cumulus" } events = { group = "org.geysermc.event", name = "events", version.ref = "events" } +floodgate-core = { module = "org.geysermc.floodgate:core", version.ref = "floodgate" } +floodgate-bungee = { module = "org.geysermc.floodgate:bungee-base", version.ref = "floodgate" } +floodgate-spigot = { module = "org.geysermc.floodgate:spigot-base", version.ref = "floodgate" } +floodgate-velocity = { module = "org.geysermc.floodgate:velocity-base", version.ref = "floodgate" } + erosion-bukkit-common = { group = "org.geysermc.erosion", name = "bukkit-common", version.ref = "erosion" } erosion-common = { group = "org.geysermc.erosion", name = "common", version.ref = "erosion" } @@ -100,9 +106,9 @@ protocol-codec = { group = "org.cloudburstmc.protocol", name = "bedrock-codec", protocol-connection = { group = "org.cloudburstmc.protocol", name = "bedrock-connection", version.ref = "protocol-connection" } [bundles] -jackson = [ "jackson-annotations", "jackson-core", "jackson-dataformat-yaml" ] -fastutil = [ "fastutil-int-int-maps", "fastutil-int-long-maps", "fastutil-int-byte-maps", "fastutil-int-boolean-maps", "fastutil-object-int-maps", "fastutil-object-object-maps" ] -adventure = [ "adventure-text-serializer-gson", "adventure-text-serializer-legacy", "adventure-text-serializer-plain" ] -log4j = [ "log4j-api", "log4j-core", "log4j-slf4j18-impl" ] -jline = [ "jline-terminal", "jline-terminal-jna", "jline-reader" ] -protocol = [ "protocol-common", "protocol-codec", "protocol-connection" ] +jackson = ["jackson-annotations", "jackson-core", "jackson-dataformat-yaml"] +fastutil = ["fastutil-int-int-maps", "fastutil-int-long-maps", "fastutil-int-byte-maps", "fastutil-int-boolean-maps", "fastutil-object-int-maps", "fastutil-object-object-maps"] +adventure = ["adventure-text-serializer-gson", "adventure-text-serializer-legacy", "adventure-text-serializer-plain"] +log4j = ["log4j-api", "log4j-core", "log4j-slf4j18-impl"] +jline = ["jline-terminal", "jline-terminal-jna", "jline-reader"] +protocol = ["protocol-common", "protocol-codec", "protocol-connection"]