Removes that Locale implements Closeable

This commit is contained in:
Fuzzlemann 2017-08-15 22:30:50 +02:00
parent 401028333e
commit ae40605251

View File

@ -14,7 +14,6 @@ import main.java.com.djrapitops.plan.utilities.comparators.StringLengthComparato
import main.java.com.djrapitops.plan.utilities.file.FileUtil;
import org.bukkit.ChatColor;
import java.io.Closeable;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
@ -33,7 +32,7 @@ import java.util.stream.Collectors;
* @author Rsl1122
* @since 3.6.2
*/
public class Locale implements Closeable {
public class Locale {
private final Plan plugin;
private final Map<Msg, Message> messages;
@ -47,7 +46,8 @@ public class Locale implements Closeable {
public static void unload() {
Locale locale = LocaleHolder.getLocale();
if (locale != null) {
locale.close();
locale.messages.clear();
LocaleHolder.locale = null;
}
}
@ -334,12 +334,6 @@ public class Locale implements Closeable {
return messages.getOrDefault(msg, new Message(""));
}
@Override
public void close() {
messages.clear();
LocaleHolder.locale = null;
}
private static class LocaleHolder {
private static Locale locale;