diff options
author | Luck <git@lucko.me> | 2020-11-07 17:41:39 +0000 |
---|---|---|
committer | Luck <git@lucko.me> | 2020-11-07 17:41:39 +0000 |
commit | 8cc92ff83634dffacfe1f25a135bc9ac665ff68b (patch) | |
tree | 35efc9d9131c7ceb1db3822fbb6a0707535f7c18 /spark-forge | |
parent | 70a468e114316a98f6d7f7e91afa8d50639762c9 (diff) | |
download | spark-8cc92ff83634dffacfe1f25a135bc9ac665ff68b.tar.gz spark-8cc92ff83634dffacfe1f25a135bc9ac665ff68b.tar.bz2 spark-8cc92ff83634dffacfe1f25a135bc9ac665ff68b.zip |
Update from text to adventure
Diffstat (limited to 'spark-forge')
-rw-r--r-- | spark-forge/build.gradle | 22 | ||||
-rw-r--r-- | spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java | 6 |
2 files changed, 14 insertions, 14 deletions
diff --git a/spark-forge/build.gradle b/spark-forge/build.gradle index ead3341..31e23f6 100644 --- a/spark-forge/build.gradle +++ b/spark-forge/build.gradle @@ -18,6 +18,16 @@ minecraft { accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') } +configurations { + shade + compile.extendsFrom shade +} + +dependencies { + minecraft 'net.minecraftforge:forge:1.16.4-35.0.3' + shade project(':spark-common') +} + processResources { from(sourceSets.main.resources.srcDirs) { include 'META-INF/mods.toml' @@ -32,23 +42,13 @@ processResources { } } -configurations { - shade - compile.extendsFrom shade -} - -dependencies { - minecraft 'net.minecraftforge:forge:1.16.4-35.0.3' - shade project(':spark-common') -} - shadowJar { archiveName = 'spark-forge.jar' configurations = [project.configurations.shade] relocate 'okio', 'me.lucko.spark.lib.okio' relocate 'okhttp3', 'me.lucko.spark.lib.okhttp3' - relocate 'net.kyori.text', 'me.lucko.spark.lib.text' + relocate 'net.kyori.adventure', 'me.lucko.spark.lib.adventure' relocate 'org.tukaani.xz', 'me.lucko.spark.lib.xz' relocate 'com.google.protobuf', 'me.lucko.spark.lib.protobuf' relocate 'org.objectweb.asm', 'me.lucko.spark.lib.asm' diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java index 5ee55f7..87d394b 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java @@ -22,8 +22,8 @@ package me.lucko.spark.forge; import me.lucko.spark.common.command.sender.AbstractCommandSender; import me.lucko.spark.forge.plugin.ForgeSparkPlugin; -import net.kyori.text.Component; -import net.kyori.text.serializer.gson.GsonComponentSerializer; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer; import net.minecraft.command.ICommandSource; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.network.rcon.IServer; @@ -62,7 +62,7 @@ public class ForgeCommandSender extends AbstractCommandSender<ICommandSource> { @Override public void sendMessage(Component message) { - IFormattableTextComponent component = ITextComponent.Serializer.getComponentFromJson(GsonComponentSerializer.INSTANCE.serialize(message)); + IFormattableTextComponent component = ITextComponent.Serializer.getComponentFromJson(GsonComponentSerializer.gson().serialize(message)); super.delegate.sendMessage(component, Util.DUMMY_UUID); } |