Skip to content

Commit

Permalink
Fix config issues.
Browse files Browse the repository at this point in the history
Populate challenge lore and level lore with all enum values on initialization, instead of leaving them empty.

Fix wrong message about reset for some config options.
  • Loading branch information
BONNe committed May 8, 2020
1 parent 1c9aa66 commit e32799a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/world/bentobox/challenges/config/Settings.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package world.bentobox.challenges.config;


import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -34,22 +34,22 @@ public class Settings implements ConfigObject
@ConfigComment("Allows to define common challenges command that will open User GUI")
@ConfigComment("with all GameMode selection or Challenges from user world.")
@ConfigComment("This will not affect /{gamemode_user} challenges command.")
@ConfigEntry(path = "commands.user", needsReset = true)
@ConfigEntry(path = "commands.user", needsRestart = true)
private String userCommand = "challenges c";

@ConfigComment("")
@ConfigComment("Allows to define common challenges command that will open Admin GUI")
@ConfigComment("with all GameMode selection.")
@ConfigComment("This will not affect /{gamemode_admin} challenges command.")
@ConfigEntry(path = "commands.admin", needsReset = true)
@ConfigEntry(path = "commands.admin", needsRestart = true)
private String adminCommand = "challengesadmin chadmin";

@ConfigComment("")
@ConfigComment("This enables/disables common command that will be independent from")
@ConfigComment("all GameModes. For admins it will open selection with all GameModes")
@ConfigComment("(unless there is one), but for users it will open GUI that corresponds")
@ConfigComment("to their world (unless it is specified other way in Admin GUI).")
@ConfigEntry(path = "commands.single-gui", needsReset = true)
@ConfigEntry(path = "commands.single-gui", needsRestart = true)
private boolean useCommonGUI = false;

@ConfigComment("")
Expand Down Expand Up @@ -130,7 +130,7 @@ public class Settings implements ConfigObject
@ConfigComment("Requirement and reward items, blocks and entities that are defined in challenge and can be customized under 'challenges.gui.item-description.*'")
@ConfigEntry(path = "gui-settings.challenge-lore")
@Adapter(ChallengeLoreAdapter.class)
private List<ChallengeLore> challengeLoreMessage = new ArrayList<>();
private List<ChallengeLore> challengeLoreMessage = Arrays.asList(ChallengeLore.values());

@ConfigComment("")
@ConfigComment("This string allows to change element order in Level description. Each letter represents")
Expand All @@ -149,7 +149,7 @@ public class Settings implements ConfigObject
@ConfigComment("Reward items that are defined in challenge level and can be customized under 'challenges.gui.item-description.*'")
@ConfigEntry(path = "gui-settings.level-lore")
@Adapter(LevelLoreAdapter.class)
private List<LevelLore> levelLoreMessage = new ArrayList<>();
private List<LevelLore> levelLoreMessage = Arrays.asList(LevelLore.values());

@ConfigComment("")
@ConfigComment("This indicate if challenges data will be stored per island (true) or per player (false).")
Expand Down

0 comments on commit e32799a

Please sign in to comment.