Fixed actionbars not displaying if class actionsbars were empty

This commit is contained in:
ASangarin 2020-09-12 20:41:38 +02:00
parent 9c48b96f18
commit 0b869c4be5

View File

@ -90,7 +90,7 @@ public class PlayerClass extends PostLoadObject {
: ManaDisplayOptions.DEFAULT; : ManaDisplayOptions.DEFAULT;
maxLevel = config.getInt("max-level"); maxLevel = config.getInt("max-level");
displayOrder = config.getInt("display.order"); displayOrder = config.getInt("display.order");
actionBarFormat = config.getString("action-bar", ""); actionBarFormat = config.contains("action-bar", true) ? config.getString("action-bar") : null;
expCurve = config.contains("exp-curve") expCurve = config.contains("exp-curve")
? MMOCore.plugin.experience.getOrThrow( ? MMOCore.plugin.experience.getOrThrow(
@ -329,6 +329,6 @@ public class PlayerClass extends PostLoadObject {
} }
public boolean hasActionBar() { public boolean hasActionBar() {
return actionBarFormat.isEmpty(); return actionBarFormat == null;
} }
} }