Added TwoStateOwner labels

This commit is contained in:
M66B
2022-04-18 12:52:20 +02:00
parent 092b16a6dc
commit c459d3cf36
2 changed files with 13 additions and 0 deletions

View File

@@ -65,6 +65,17 @@ public class CoalMine {
reporter.getLabels().add("started=" + label);
}
}
} else if (className.equals(TwoStateOwner.class.getName())) {
HeapField hfState = instance.get(className, "state");
if (hfState != null) {
String state = hfState.getValue().readAsJavaString();
reporter.getLabels().add("state=" + state);
}
HeapField hfOwned = instance.get(className, "owned");
if (hfOwned != null) {
Boolean owned = hfOwned.getValue().getAsBoolean();
reporter.getLabels().add("owned=" + owned);
}
}
return null;