Skip to content

Commit

Permalink
Add ability to get all registered languages
Browse files Browse the repository at this point in the history
  • Loading branch information
BoomEaro committed Aug 28, 2024
1 parent b5b74d3 commit 9abe3f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ public void unregisterLanguageType(LangType langType) {
this.plugin.getLogger().log(Level.INFO, "Unregistering language " + langType.name());
}

@Override
public Set<LangType> getRegisteredLanguages() {
return Collections.unmodifiableSet(this.registeredLanguages);
}

@Override
public Collection<TranslatedMessages> getAllTranslate() {
return this.types.values();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.bukkit.potion.PotionEffectType;

import java.util.Collection;
import java.util.Set;

public interface TranslateManager {

Expand Down Expand Up @@ -164,4 +165,10 @@ public interface TranslateManager {
*/
void unregisterLanguageType(LangType langType);

/**
* Получить все зарегистрированные языки
* @return зарегистрированные языки
*/
Set<LangType> getRegisteredLanguages();

}

0 comments on commit 9abe3f1

Please sign in to comment.