Skip to content

Commit

Permalink
FIX: npe when accessing Essentials' locale
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinWieczorek committed Jan 8, 2016
1 parent 4e2a9ee commit 6a9dc33
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ public static void detectEssentialsLocale() {
Essentials essentials = (Essentials) Bukkit.getPluginManager().getPlugin("Essentials");

if(essentials != null && !Config.LANG_OVERRIDEESSENTIALS.getBoolean()) {
if(essentials.getSettings() == null) {
return;
}

String locale = essentials.getSettings().getLocale();
if(locale.isEmpty()) {
locale = "en";
Expand Down

0 comments on commit 6a9dc33

Please sign in to comment.