29 lines
698 B
Java
29 lines
698 B
Java
|
package wtf.beatrice.nounspicker.objects;
|
||
|
|
||
|
import org.jetbrains.annotations.NotNull;
|
||
|
import org.jetbrains.annotations.Nullable;
|
||
|
|
||
|
import java.util.HashMap;
|
||
|
|
||
|
public class Cache
|
||
|
{
|
||
|
|
||
|
// map to store pronouns' "raw" names and how they appear in game.
|
||
|
private static final HashMap<String, String> pronouns = new HashMap<>();
|
||
|
|
||
|
public static @Nullable String getPronoun(String pronoun)
|
||
|
{
|
||
|
return pronouns.get(pronoun);
|
||
|
}
|
||
|
|
||
|
public static void addPronoun(@NotNull String pronoun, @NotNull String appearance)
|
||
|
{
|
||
|
pronouns.put(pronoun, appearance);
|
||
|
}
|
||
|
|
||
|
public static boolean isPronounValid(String pronoun)
|
||
|
{
|
||
|
return getPronoun(pronoun) != null;
|
||
|
}
|
||
|
}
|