Fixed bug with saving to flat file.

Must remember to include blank constructor so Beans can create the
object!
This commit is contained in:
tastybento 2018-05-29 14:57:26 -07:00
parent ac9ac426d9
commit afce568a24
4 changed files with 6 additions and 2 deletions

View File

@ -308,7 +308,7 @@ blocks:
# If a block is not listed, the default value will be used
# Prefix with world name
worlds:
AcidIsland-world:
AcidIsland_world:
SAND: 0
SANDSTONE: 0
ICE: 0

View File

@ -96,7 +96,7 @@ public class Settings {
worldBlockValues.put(bWorld, values);
}
} else {
level.getLogger().severe("No such world : " + world);
level.getLogger().severe("Level Addon: No such world : " + world);
}
}
}

View File

@ -20,6 +20,8 @@ public class LevelsData implements DataObject {
@Expose
private Map<String, Long> levels = new HashMap<>();
public LevelsData() {} // For Bean loading
/**
* Create a level entry for target player
* @param targetPlayer

View File

@ -23,6 +23,8 @@ public class TopTenData implements DataObject {
@Expose
private Map<UUID, Long> topTen = new LinkedHashMap<>();
public TopTenData() {}
public Map<UUID, Long> getTopTen() {
return topTen.entrySet().stream()
.sorted(Collections.reverseOrder(Map.Entry.comparingByValue())).limit(10)