Fixed compile error

This commit is contained in:
Rsl1122 2019-09-22 12:44:23 +03:00
parent 36da911f84
commit 68a2c3b571

View File

@ -50,14 +50,14 @@ public class WorldAliasSettings {
private final Lazy<PlanConfig> config; private final Lazy<PlanConfig> config;
private final Supplier<Formatter<Double>> percentageFormatter; private final Supplier<Formatter<Double>> percentageFormatter;
private final Locale locale; private final Lazy<Locale> locale;
private final Processing processing; private final Processing processing;
private final ErrorHandler errorHandler; private final ErrorHandler errorHandler;
@Inject @Inject
public WorldAliasSettings( public WorldAliasSettings(
Lazy<PlanConfig> config, Lazy<PlanConfig> config,
Locale locale, Lazy<Locale> locale,
Lazy<Formatters> formatters, Lazy<Formatters> formatters,
Processing processing, Processing processing,
ErrorHandler errorHandler ErrorHandler errorHandler
@ -159,13 +159,13 @@ public class WorldAliasSettings {
ConfigNode aliases = getAliasSection(); ConfigNode aliases = getAliasSection();
if (!session.supports(SessionKeys.WORLD_TIMES)) { if (!session.supports(SessionKeys.WORLD_TIMES)) {
return locale.get(HtmlLang.UNIT_NO_DATA).toString(); return locale.get().getString(HtmlLang.UNIT_NO_DATA);
} }
WorldTimes worldTimes = session.getValue(SessionKeys.WORLD_TIMES).orElse(new WorldTimes()); WorldTimes worldTimes = session.getValue(SessionKeys.WORLD_TIMES).orElse(new WorldTimes());
if (!session.supports(SessionKeys.END)) { if (!session.supports(SessionKeys.END)) {
return worldTimes.getCurrentWorld() return worldTimes.getCurrentWorld()
.map(currentWorld -> "Current: " + (aliases.contains(currentWorld) ? aliases.getString(currentWorld) : currentWorld)) .map(currentWorld -> "Current: " + (aliases.contains(currentWorld) ? aliases.getString(currentWorld) : currentWorld))
.orElse("Current: " + locale.get(GenericLang.UNAVAILABLE)); .orElse("Current: " + locale.get().getString(GenericLang.UNAVAILABLE));
} }
Map<String, Long> playtimePerAlias = getPlaytimePerAlias(worldTimes); Map<String, Long> playtimePerAlias = getPlaytimePerAlias(worldTimes);