mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 09:37:50 +01:00
Remove hash comment when rebuilding JSON database
This commit is contained in:
parent
fec655a29c
commit
1be7fbd8a6
@ -99,7 +99,10 @@ public class FlatItemDbProvider extends ItemDbProvider {
|
||||
|
||||
@Override
|
||||
public void rebuild(List<String> lines) {
|
||||
String json = String.join("\n", lines);
|
||||
String json = lines.stream()
|
||||
.filter(line -> !line.startsWith("#"))
|
||||
.collect(Collectors.joining("\n"));
|
||||
|
||||
JsonObject map = (new JsonParser()).parse(json).getAsJsonObject();
|
||||
|
||||
for (Map.Entry<String, JsonElement> entry : map.entrySet()) {
|
||||
|
Loading…
Reference in New Issue
Block a user