mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-11-22 11:55:54 +01:00
Fix deprecation in ComponentFactory
This commit is contained in:
parent
26c6a909da
commit
76374f49dd
@ -32,6 +32,7 @@ import dev.vankka.mcdiscordreserializer.minecraft.MinecraftSerializer;
|
|||||||
import dev.vankka.mcdiscordreserializer.minecraft.MinecraftSerializerOptions;
|
import dev.vankka.mcdiscordreserializer.minecraft.MinecraftSerializerOptions;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.TranslatableComponent;
|
import net.kyori.adventure.text.TranslatableComponent;
|
||||||
|
import net.kyori.adventure.text.TranslationArgument;
|
||||||
import net.kyori.adventure.text.flattener.ComponentFlattener;
|
import net.kyori.adventure.text.flattener.ComponentFlattener;
|
||||||
import net.kyori.adventure.text.serializer.ansi.ANSIComponentSerializer;
|
import net.kyori.adventure.text.serializer.ansi.ANSIComponentSerializer;
|
||||||
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||||
@ -90,10 +91,9 @@ public class ComponentFactory implements MinecraftComponentFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return translation.translate(
|
return translation.translate(
|
||||||
component.args()
|
component.arguments()
|
||||||
.stream()
|
.stream()
|
||||||
.map(discordSerializer::serialize)
|
.map(TranslationArgument::value)
|
||||||
.map(str -> (Object) str)
|
|
||||||
.toArray(Object[]::new)
|
.toArray(Object[]::new)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user