Перейти к основному содержимому

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

Поля

ПолеТипПо умолчаниюОписание
groupRef<GroupEntry>—If left empty, every player has its own group.
compareToString—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)
ПолеТипПо умолчаниюОписание
commentString—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.