Change variable / method names to match Java Conventions

This commit is contained in:
Fuzzlemann 2017-08-12 00:32:20 +02:00
parent a1e87089bb
commit 26c3cd45aa

View File

@ -39,7 +39,7 @@ public class Locale implements Closeable {
private final Map<Msg, Message> messages; private final Map<Msg, Message> messages;
public Locale(Plan plugin) { public Locale(Plan plugin) {
LocaleHolder.setLOCALE(this); LocaleHolder.setLocale(this);
this.plugin = plugin; this.plugin = plugin;
messages = new HashMap<>(); messages = new HashMap<>();
} }
@ -322,18 +322,18 @@ public class Locale implements Closeable {
@Override @Override
public void close() { public void close() {
messages.clear(); messages.clear();
LocaleHolder.LOCALE = null; LocaleHolder.locale = null;
} }
public static void unload() { public static void unload() {
Locale locale = LocaleHolder.getLOCALE(); Locale locale = LocaleHolder.getLocale();
if (locale != null) { if (locale != null) {
locale.close(); locale.close();
} }
} }
public static Message get(Msg msg) { public static Message get(Msg msg) {
Locale locale = LocaleHolder.getLOCALE(); Locale locale = LocaleHolder.getLocale();
if (locale == null) { if (locale == null) {
throw new IllegalStateException("Locale has not been initialized."); throw new IllegalStateException("Locale has not been initialized.");
} }
@ -342,14 +342,14 @@ public class Locale implements Closeable {
private static class LocaleHolder { private static class LocaleHolder {
private static Locale LOCALE; private static Locale locale;
public static void setLOCALE(Locale LOCALE) { public static void setLocale(Locale locale) {
LocaleHolder.LOCALE = LOCALE; LocaleHolder.locale = locale;
} }
public static Locale getLOCALE() { public static Locale getLocale() {
return LOCALE; return locale;
} }
} }
} }