mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Update Bungee version check, create logger earlier (#4697)
* use the logger where possible instead of system.out.print * make loggers final * yeet unused constructors * velocity is more complicated
This commit is contained in:
parent
fe63665d88
commit
0fcf0f9b4f
12 changed files with 67 additions and 83 deletions
|
@ -766,6 +766,7 @@ public class GeyserImpl implements GeyserApi {
|
|||
return 0;
|
||||
}
|
||||
|
||||
//noinspection DataFlowIssue
|
||||
return Integer.parseInt(BUILD_NUMBER);
|
||||
}
|
||||
|
||||
|
|
|
@ -148,9 +148,9 @@ public class GeyserLocale {
|
|||
} catch (IOException ignored) {}
|
||||
}
|
||||
} else {
|
||||
if (GeyserImpl.getInstance() != null && !validLocalLanguage) {
|
||||
if (!validLocalLanguage) {
|
||||
// Don't warn on missing locales if a local file has been found
|
||||
GeyserImpl.getInstance().getLogger().warning("Missing locale: " + locale);
|
||||
bootstrap.getGeyserLogger().warning("Missing locale: " + locale);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -162,12 +162,7 @@ public class GeyserLocale {
|
|||
localeProp.load(stream);
|
||||
} catch (IOException e) {
|
||||
String message = "Unable to load custom language override!";
|
||||
if (GeyserImpl.getInstance() != null) {
|
||||
GeyserImpl.getInstance().getLogger().error(message, e);
|
||||
} else {
|
||||
System.err.println(message);
|
||||
e.printStackTrace();
|
||||
}
|
||||
bootstrap.getGeyserLogger().error(message, e);
|
||||
}
|
||||
|
||||
LOCALE_MAPPINGS.putIfAbsent(locale, localeProp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue