MCPcopy Create free account
hub / github.com/ViaVersion/ViaProxy / setLocale

Method setLocale

src/main/java/net/raphimc/viaproxy/ui/I18n.java:105–113  ·  view source on GitHub ↗
(final String locale)

Source from the content-addressed store, hash-verified

103 }
104
105 public static void setLocale(final String locale) {
106 if (ViaProxy.getSaveManager() == null) {
107 throw new IllegalStateException("ViaProxy is not yet initialized");
108 }
109
110 currentLocale = locale;
111 ViaProxy.getSaveManager().uiSave.put("locale", locale);
112 ViaProxy.getSaveManager().save();
113 }
114
115 public static Collection<String> getAvailableLocales() {
116 return LOCALES.keySet();

Callers 1

initMethod · 0.95

Calls 3

getSaveManagerMethod · 0.95
putMethod · 0.80
saveMethod · 0.45

Tested by

no test coverage detected