From 05d0aa500c9dd674c4838f61bb0e7210072f109b Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 14 Apr 2024 09:48:59 +0100 Subject: [PATCH] fix map metric --- .../mcutils/backend/service/metric/impl/MapMetric.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/xyz/mcutils/backend/service/metric/impl/MapMetric.java b/src/main/java/xyz/mcutils/backend/service/metric/impl/MapMetric.java index dcd808c..66c9471 100644 --- a/src/main/java/xyz/mcutils/backend/service/metric/impl/MapMetric.java +++ b/src/main/java/xyz/mcutils/backend/service/metric/impl/MapMetric.java @@ -18,16 +18,10 @@ public class MapMetric extends Metric> { for (Map.Entry entry : getValue().entrySet()) { switch (entry.getValue().getClass().getSimpleName()) { case "Integer": - point.addField(entry.getKey().toString(), (Integer) entry.getValue()); + point.addField(entry.getKey().toString(), (int) entry.getValue()); break; case "Double": - point.addField(entry.getKey().toString(), (Double) entry.getValue()); - break; - case "String": - point.addField(entry.getKey().toString(), (String) entry.getValue()); - break; - case "Boolean": - point.addField(entry.getKey().toString(), (Boolean) entry.getValue()); + point.addField(entry.getKey().toString(), (double) entry.getValue()); break; default: point.addField(entry.getKey().toString(), entry.getValue().toString());