Skip to content

Commit

Permalink
Fix difficulty defaulting to null.
Browse files Browse the repository at this point in the history
  • Loading branch information
creatorfromhell committed Dec 3, 2023
1 parent 1e8e6f4 commit 8d03e69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public class WorldFolderSuggestion implements SuggestionProvider {
final File directory = Bukkit.getWorldContainer();

for(File file : directory.listFiles()) {
if(file.isDirectory()) {
final File levelDat = new File(file, "level.dat");
if(file.isDirectory() && levelDat.exists()) {
folders.add(file.getName());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public PhantomWorld getPhantomWorldFromData(final String name) {
PhantomWorlds.instance().data.getConfig().getBoolean(cfgPath + "spawnAnimals", true),
PhantomWorlds.instance().data.getConfig().getBoolean(cfgPath + "keepSpawnInMemory", false),
PhantomWorlds.instance().data.getConfig().getBoolean(cfgPath + "allowPvP", true),
Difficulty.valueOf(PhantomWorlds.instance().data.getConfig().getString(cfgPath + "difficulty", null)),
Difficulty.valueOf(PhantomWorlds.instance().data.getConfig().getString(cfgPath + "difficulty", "NORMAL")),
GameMode.valueOf(PhantomWorlds.instance().data.getConfig().getString(cfgPath + "gameMode", "SURVIVAL"))
);

Expand Down

0 comments on commit 8d03e69

Please sign in to comment.