1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 20:16:13 +01:00

Update LanguageManager.java

This commit is contained in:
montlikadani 2018-08-16 18:33:20 +02:00 committed by GitHub
parent e2e47ac25e
commit c1829dd560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ public class LanguageManager {
this.plugin = plugin;
}
List<String> languages = new ArrayList<String>();
List<String> languages = new ArrayList<>();
public List<String> getLanguages() {
return languages;
@ -46,7 +46,7 @@ public class LanguageManager {
private static List<String> getClassesInSamePackageFromJar(String packageName, String jarPath, String cleaner) {
JarFile jarFile = null;
List<String> listOfCommands = new ArrayList<String>();
List<String> listOfCommands = new ArrayList<>();
try {
jarFile = new JarFile(jarPath);
Enumeration<JarEntry> en = jarFile.entries();
@ -80,7 +80,7 @@ public class LanguageManager {
* loads from Jobs/locale/messages_en.yml
*/
synchronized void load() {
languages = new ArrayList<String>();
languages = new ArrayList<>();
try {
languages.addAll(getClassesFromPackage("locale", "messages_"));