1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-26 04:25:15 +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; this.plugin = plugin;
} }
List<String> languages = new ArrayList<String>(); List<String> languages = new ArrayList<>();
public List<String> getLanguages() { public List<String> getLanguages() {
return languages; return languages;
@ -46,7 +46,7 @@ public class LanguageManager {
private static List<String> getClassesInSamePackageFromJar(String packageName, String jarPath, String cleaner) { private static List<String> getClassesInSamePackageFromJar(String packageName, String jarPath, String cleaner) {
JarFile jarFile = null; JarFile jarFile = null;
List<String> listOfCommands = new ArrayList<String>(); List<String> listOfCommands = new ArrayList<>();
try { try {
jarFile = new JarFile(jarPath); jarFile = new JarFile(jarPath);
Enumeration<JarEntry> en = jarFile.entries(); Enumeration<JarEntry> en = jarFile.entries();
@ -80,7 +80,7 @@ public class LanguageManager {
* loads from Jobs/locale/messages_en.yml * loads from Jobs/locale/messages_en.yml
*/ */
synchronized void load() { synchronized void load() {
languages = new ArrayList<String>(); languages = new ArrayList<>();
try { try {
languages.addAll(getClassesFromPackage("locale", "messages_")); languages.addAll(getClassesFromPackage("locale", "messages_"));