Player Language Fact
Returns the player's current language as a numeric value
Fact that returns a numeric identifier for the player's current language. The value is the hashCode of the language name, allowing criteria comparisons. Use this to check if a player has a specific language set. Example usage in criteria: - == languageName.hashCode() to check exact language
字段
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
group | Ref<GroupEntry> | — | If left empty, every player has its own group. |
compareTo | String | — | The language name to compare against. If set, returns 1 if player has this language, 0 otherwise. If empty, returns the hashCode of the player's current language. |
TypeWriter 通用字段(comment)
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
comment | String | — | A comment to keep track of what this fact is used for.多行 |
How to use it
Set compareTo to a language name (for example fr_FR, case-insensitive) to get 1 when the player has it and 0 otherwise: use it in a criterion == 1. If compareTo is empty the fact returns the hash code of the language name, which is only useful for comparing against another value of the same kind.