@@ -11,6 +11,7 @@ import net.kyori.adventure.util.Ticks
1111import java.net.SocketAddress
1212import java.util.UUID
1313import java.util.concurrent.CompletionException
14+ import net.kyori.adventure.text.Component as KComponent
1415import net.kyori.adventure.title.Title as ATitle
1516
1617class VelocityPlayerActor (private val player : Player ): VelocityActor(player), PlayerActor {
@@ -28,7 +29,7 @@ class VelocityPlayerActor(private val player: Player): VelocityActor(player), Pl
2829 }
2930
3031 override fun disconnect (vararg reason : Component ) {
31- return player.disconnect(TextComponent .ofChildren (* reason.toVelocity()))
32+ return player.disconnect(KComponent .textOfChildren (* reason.toVelocity()))
3233 }
3334
3435 override fun getRemoteAddress (): SocketAddress = player.remoteAddress
@@ -45,9 +46,9 @@ class VelocityPlayerActor(private val player: Player): VelocityActor(player), Pl
4546
4647 override fun sendTitle (title : Title ) {
4748 val adventure = ATitle .title(
48- TextComponent .ofChildren (* title.title.toVelocity()),
49- TextComponent .ofChildren (* title.subTitle.toVelocity()),
50- ATitle .Times .of (
49+ KComponent .textOfChildren (* title.title.toVelocity()),
50+ KComponent .textOfChildren (* title.subTitle.toVelocity()),
51+ ATitle .Times .times (
5152 Ticks .duration(title.fadeIn.toLong()),
5253 Ticks .duration(title.stay.toLong()),
5354 Ticks .duration(title.fadeOut.toLong())
0 commit comments