Skip to content

Commit 51f3965

Browse files
committed
getPlayerLanguage added in LocalizationAPI.kt.
Signed-off-by: Pavel Erokhin (MairwunNx) <[email protected]>
1 parent 041d88c commit 51f3965

File tree

1 file changed

+8
-0
lines changed
  • src/main/kotlin/com/mairwunnx/projectessentials/core/api/v1/localization

1 file changed

+8
-0
lines changed

src/main/kotlin/com/mairwunnx/projectessentials/core/api/v1/localization/LocalizationAPI.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package com.mairwunnx.projectessentials.core.api.v1.localization
44

55
import com.mairwunnx.projectessentials.core.api.v1.extensions.empty
66
import com.mairwunnx.projectessentials.core.api.v1.localization.LocalizationProcessor.fallbackLanguage
7+
import net.minecraft.entity.player.ServerPlayerEntity
78

89
/**
910
* Localization API class, for interacting with
@@ -116,4 +117,11 @@ object LocalizationAPI {
116117
}
117118
return msg
118119
}
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
119127
}

0 commit comments

Comments
 (0)