Suppress warnings for disabled trackers
This commit is contained in:
1 parent
9426f631cb
commit
2785e88306
1 file changed
+11
-6
@@ -20,6 +20,17 @@ record TrackerLoader(BattleTracker battleTracker, Configuration configuration, P
|
||||
|
||||
public void load() {
|
||||
String name = this.configuration.getString("name");
|
||||
List<String> trackedData = this.configuration.getStringList("tracked-statistics");
|
||||
boolean enabled = this.configuration.getBoolean("enabled", !trackedData.isEmpty());
|
||||
if (!enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (trackedData.isEmpty()) {
|
||||
this.battleTracker.warn("No tracked data found for tracker {}!", name);
|
||||
return;
|
||||
}
|
||||
|
||||
String calculatorName = this.configuration.getString("calculator");
|
||||
RatingCalculator calculator = this.battleTracker.getCalculator(calculatorName);
|
||||
if (calculator == null) {
|
||||
@@ -27,12 +38,6 @@ record TrackerLoader(BattleTracker battleTracker, Configuration configuration, P
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> trackedData = this.configuration.getStringList("tracked-statistics");
|
||||
if (trackedData.isEmpty()) {
|
||||
this.battleTracker.warn("No tracked data found for tracker {}!", name);
|
||||
return;
|
||||
}
|
||||
|
||||
Set<TrackedDataType> dataTypes = EnumSet.noneOf(TrackedDataType.class);
|
||||
for (String data : trackedData) {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user