mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-11-27 20:46:19 +01:00
Fixed bug with saving to flat file.
Must remember to include blank constructor so Beans can create the object!
This commit is contained in:
parent
ac9ac426d9
commit
afce568a24
@ -308,7 +308,7 @@ blocks:
|
|||||||
# If a block is not listed, the default value will be used
|
# If a block is not listed, the default value will be used
|
||||||
# Prefix with world name
|
# Prefix with world name
|
||||||
worlds:
|
worlds:
|
||||||
AcidIsland-world:
|
AcidIsland_world:
|
||||||
SAND: 0
|
SAND: 0
|
||||||
SANDSTONE: 0
|
SANDSTONE: 0
|
||||||
ICE: 0
|
ICE: 0
|
||||||
|
@ -96,7 +96,7 @@ public class Settings {
|
|||||||
worldBlockValues.put(bWorld, values);
|
worldBlockValues.put(bWorld, values);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
level.getLogger().severe("No such world : " + world);
|
level.getLogger().severe("Level Addon: No such world : " + world);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,8 @@ public class LevelsData implements DataObject {
|
|||||||
@Expose
|
@Expose
|
||||||
private Map<String, Long> levels = new HashMap<>();
|
private Map<String, Long> levels = new HashMap<>();
|
||||||
|
|
||||||
|
public LevelsData() {} // For Bean loading
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a level entry for target player
|
* Create a level entry for target player
|
||||||
* @param targetPlayer
|
* @param targetPlayer
|
||||||
|
@ -23,6 +23,8 @@ public class TopTenData implements DataObject {
|
|||||||
@Expose
|
@Expose
|
||||||
private Map<UUID, Long> topTen = new LinkedHashMap<>();
|
private Map<UUID, Long> topTen = new LinkedHashMap<>();
|
||||||
|
|
||||||
|
public TopTenData() {}
|
||||||
|
|
||||||
public Map<UUID, Long> getTopTen() {
|
public Map<UUID, Long> getTopTen() {
|
||||||
return topTen.entrySet().stream()
|
return topTen.entrySet().stream()
|
||||||
.sorted(Collections.reverseOrder(Map.Entry.comparingByValue())).limit(10)
|
.sorted(Collections.reverseOrder(Map.Entry.comparingByValue())).limit(10)
|
||||||
|
Loading…
Reference in New Issue
Block a user