MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / has

Method has

The 5zig Mod/src/eu/the5zig/mod/I18n.java:203–223  ·  view source on GitHub ↗
(String key)

Source from the content-addressed store, hash-verified

201 }
202
203 public static boolean has(String key) {
204 if (defaultBundle != null && defaultBundle.containsKey(key)) {
205 return true;
206 }
207 if (resourceBundle != null && resourceBundle.containsKey(key)) {
208 return true;
209 }
210
211 if (The5zigMod.getAPI() != null && The5zigMod.getAPI().getPluginManager() != null) {
212 for (LoadedPlugin loadedPlugin : The5zigMod.getAPI().getPluginManager().getPlugins()) {
213 if (loadedPlugin.getLocales().containsKey(currentLanguage) && loadedPlugin.getLocales().get(currentLanguage).containsKey(key)) {
214 return true;
215 }
216 if (loadedPlugin.getLocales().containsKey(Locale.US) && loadedPlugin.getLocales().get(Locale.US).containsKey(key)) {
217 return true;
218 }
219 }
220 }
221
222 return false;
223 }
224
225 public static Locale deserialize(String file) {
226 String[] args = file.split("_");

Callers 15

addBroadcastMethod · 0.95
drawScreen0Method · 0.95
drawScreen0Method · 0.95
drawScreen0Method · 0.95
getHoverTextMethod · 0.95
loadPlugin0Method · 0.80
addModulesMethod · 0.80
parseMethod · 0.80
loadModulesMethod · 0.80
tryCopyItemMethod · 0.80
parseModuleMethod · 0.80
parseItemMethod · 0.80

Calls 6

getAPIMethod · 0.95
containsKeyMethod · 0.80
getPluginManagerMethod · 0.80
getPluginsMethod · 0.80
getMethod · 0.65
getLocalesMethod · 0.45

Tested by

no test coverage detected