(String key)
| 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("_"); |
no test coverage detected