Skip to content

Commit

Permalink
Allow getting language by name
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Aug 2, 2024
1 parent 7044bf8 commit f7b87c9
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ public LanguageManager(TemplatePaperPlugin plugin) {
}
}

public Language getLanguageByName(String name) {
for (Language language : Language.values()) {
if (getLanguageData(language).getName().equals(name)) {
return language;
}
}

return null;
}

public LanguageData getLanguageData(Language language) {
return languages.get(language);
}
Expand Down

0 comments on commit f7b87c9

Please sign in to comment.