We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
getPlayerLanguage
1 parent 041d88c commit 51f3965Copy full SHA for 51f3965
src/main/kotlin/com/mairwunnx/projectessentials/core/api/v1/localization/LocalizationAPI.kt
@@ -4,6 +4,7 @@ package com.mairwunnx.projectessentials.core.api.v1.localization
4
5
import com.mairwunnx.projectessentials.core.api.v1.extensions.empty
6
import com.mairwunnx.projectessentials.core.api.v1.localization.LocalizationProcessor.fallbackLanguage
7
+import net.minecraft.entity.player.ServerPlayerEntity
8
9
/**
10
* Localization API class, for interacting with
@@ -116,4 +117,11 @@ object LocalizationAPI {
116
117
}
118
return msg
119
120
+
121
+ /**
122
+ * @param player target player to get result.
123
+ * @return player language.
124
+ * @since 2.0.0.
125
+ */
126
+ fun getPlayerLanguage(player: ServerPlayerEntity): String = player.language
127
0 commit comments