Skip to content

Commit 6f63561

Browse files
committed
LvLVariable.kt improved.
Signed-off-by: Pavel Erokhin (MairwunNx) <[email protected]>
1 parent 6040b2d commit 6f63561

File tree

1 file changed

+5
-1
lines changed
  • src/main/kotlin/com/mairwunnx/projectessentials/chat/impl/variables

1 file changed

+5
-1
lines changed

src/main/kotlin/com/mairwunnx/projectessentials/chat/impl/variables/LvLVariable.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ package com.mairwunnx.projectessentials.chat.impl.variables
22

33
import com.mairwunnx.projectessentials.chat.api.variables.IChatVariable
44
import net.minecraft.entity.player.ServerPlayerEntity
5+
import net.minecraft.util.text.ITextComponent
6+
import net.minecraft.util.text.TextComponentUtils
57

68
object LvLVariable : IChatVariable {
79
override val variable = "lvl"
8-
override fun process(player: ServerPlayerEntity) = player.experienceLevel.toString()
10+
override fun process(
11+
player: ServerPlayerEntity
12+
): ITextComponent = TextComponentUtils.toTextComponent { player.experienceLevel.toString() }
913
}

0 commit comments

Comments
 (0)