mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Removes that Locale implements Closeable
This commit is contained in:
parent
401028333e
commit
ae40605251
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user