Skip to content

Commit c7e3bc0

Browse files
committed
remove error from config as it can't happen anymore
1 parent 4f2b1ce commit c7e3bc0

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

src/main/java/net/unknownuser/beaconrange/Config.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ public Config(int rangePerLevel, int baseRange, Map<Block, Double> rangeMultipli
4949
protected final int baseRange;
5050
@Expose
5151
protected final Map<Block, Double> rangeMultipliers; // NOSONAR
52-
// Gson *will* write all fields, even when enabling ignoreNonExposed
53-
// use transient to even skip the inclusion
54-
private transient boolean hasError = false;
55-
56-
public void enableError() {
57-
hasError = true;
58-
}
5952

6053
public static int rangePerLevel() {
6154
return instance.rangePerLevel;
@@ -97,10 +90,7 @@ private static Config loadConfig() {
9790
try (FileReader reader = new FileReader(CONFIG_FILE)) {
9891
Config config = gson.fromJson(reader, Config.class);
9992

100-
if (config.hasError) {
101-
BeaconRange.LOGGER.warn("config has errors, rewriting config file");
102-
config.write();
103-
}
93+
config.write();
10494

10595
return config;
10696
} catch (IOException e) {

0 commit comments

Comments
 (0)