@@ -20,9 +20,7 @@ package com.lambda.friend
2020import com.lambda.config.Configurable
2121import com.lambda.config.configurations.FriendConfig
2222import com.lambda.core.Loadable
23- import com.lambda.util.text.buildText
24- import com.lambda.util.text.literal
25- import com.lambda.util.text.text
23+ import com.lambda.util.text.*
2624import com.mojang.authlib.GameProfile
2725import net.minecraft.client.network.OtherClientPlayerEntity
2826import net.minecraft.text.Text
@@ -68,13 +66,23 @@ object FriendManager : Configurable(FriendConfig), Loadable {
6866 fun befriendedText (name : Text ) = buildText {
6967 literal(Color .GREEN , " Added " )
7068 text(name)
71- literal(" to your friend list" )
69+ literal(" to your friend list " )
70+ clickEvent(ClickEvents .suggestCommand(" ;friends remove ${name.string} " )) {
71+ styled(underlined = true , color = Color .LIGHT_GRAY ) {
72+ literal(" [Click to undo]" )
73+ }
74+ }
7275 }
7376
7477 fun unfriendedText (name : String ): Text = unfriendedText(Text .of(name))
7578 fun unfriendedText (name : Text ) = buildText {
7679 literal(Color .RED , " Removed " )
7780 text(name)
78- literal(" from your friend list" )
81+ literal(" from your friend list " )
82+ clickEvent(ClickEvents .suggestCommand(" ;friends add ${name.string} " )) {
83+ styled(underlined = true , color = Color .LIGHT_GRAY ) {
84+ literal(" [Click to undo]" )
85+ }
86+ }
7987 }
8088}
0 commit comments