More changes and migrations away from Jackson

This commit is contained in:
Camotoy 2024-07-09 12:26:27 -04:00
parent c095c276ef
commit ab4cc97b38
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F
22 changed files with 65 additions and 172 deletions

View file

@ -5,10 +5,11 @@ dependencies {
compileOnlyApi(libs.velocity.api)
}
platformRelocate("com.fasterxml.jackson")
platformRelocate("it.unimi.dsi.fastutil")
platformRelocate("net.kyori.adventure.text.serializer.gson.legacyimpl")
platformRelocate("org.yaml")
platformRelocate("org.spongepowered")
platformRelocate("io.leangen.geantyref")
platformRelocate("org.bstats")
exclude("com.google.*:*")

View file

@ -25,6 +25,7 @@
package org.geysermc.geyser.platform.velocity;
import com.google.gson.annotations.JsonAdapter;
import com.velocitypowered.api.plugin.PluginContainer;
import com.velocitypowered.api.proxy.ProxyServer;
import lombok.Getter;
@ -42,7 +43,7 @@ public class GeyserVelocityDumpInfo extends BootstrapDumpInfo {
private final String platformVendor;
private final boolean onlineMode;
@AsteriskSerializer.Asterisk(isIp = true)
@JsonAdapter(value = AsteriskSerializer.class)
private final String serverIP;
private final int serverPort;
private final List<PluginInfo> plugins;

View file

@ -46,7 +46,7 @@ import org.geysermc.geyser.api.command.Command;
import org.geysermc.geyser.api.extension.Extension;
import org.geysermc.geyser.api.util.PlatformType;
import org.geysermc.geyser.command.GeyserCommandManager;
import org.geysermc.geyser.configuration.ConfigLoaderTemp;
import org.geysermc.geyser.configuration.ConfigLoader;
import org.geysermc.geyser.configuration.GeyserPluginConfig;
import org.geysermc.geyser.dump.BootstrapDumpInfo;
import org.geysermc.geyser.network.GameProtocol;
@ -248,7 +248,7 @@ public class GeyserVelocityPlugin implements GeyserPluginBootstrap {
//noinspection ResultOfMethodCallIgnored
configFolder.toFile().mkdirs();
}
this.geyserConfig = ConfigLoaderTemp.load(configFolder.resolve("config.yml").toFile(), GeyserPluginConfig.class);
this.geyserConfig = ConfigLoader.load(configFolder.resolve("config.yml").toFile(), GeyserPluginConfig.class);
} catch (IOException ex) {
geyserLogger.error(GeyserLocale.getLocaleStringLog("geyser.config.failed"), ex);
ex.printStackTrace();