Update locale library, fixes #2103

This commit is contained in:
PikaMug 2023-05-12 23:51:12 -04:00
parent b3bd277478
commit efb42f4d2c
3 changed files with 6 additions and 2 deletions

View File

@ -159,7 +159,7 @@
<dependency> <dependency>
<groupId>com.github.PikaMug</groupId> <groupId>com.github.PikaMug</groupId>
<artifactId>LocaleLib</artifactId> <artifactId>LocaleLib</artifactId>
<version>3.3</version> <version>3.4</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>xyz.upperlevel.spigot.book</groupId> <groupId>xyz.upperlevel.spigot.book</groupId>

View File

@ -2183,6 +2183,10 @@ public class Quester implements IQuester {
} }
final Settings settings = plugin.getSettings(); final Settings settings = plugin.getSettings();
final LocaleManager localeManager = plugin.getLocaleManager(); final LocaleManager localeManager = plugin.getLocaleManager();
if (settings.canTranslateNames() && localeManager == null) {
settings.setTranslateNames(false);
plugin.getLogger().severe("Problem with locale manager! Item name translation disabled.");
}
for (BukkitObjective objective : q.getCurrentObjectivesTemp(quest, false, false)) { for (BukkitObjective objective : q.getCurrentObjectivesTemp(quest, false, false)) {
final String message = "- " + objective.getMessage(); final String message = "- " + objective.getMessage();
if (objective.getProgressAsItem() != null && objective.getGoalAsItem() != null) { if (objective.getProgressAsItem() != null && objective.getGoalAsItem() != null) {

View File

@ -189,7 +189,7 @@ public class Quests extends JavaPlugin implements QuestsAPI {
Class.forName("me.blackvein.quests.libs.localelib.LocaleManager"); Class.forName("me.blackvein.quests.libs.localelib.LocaleManager");
localeManager = new LocaleManager(); localeManager = new LocaleManager();
} catch (final Exception ignored) { } catch (final Exception ignored) {
getLogger().info("LocaleLib not present. Is this a debug environment?"); getLogger().warning("LocaleLib not present! Is this a debug environment?");
} }
convoListener = new ConvoListener(); convoListener = new ConvoListener();
blockListener = new BlockListener(this); blockListener = new BlockListener(this);