Skip to content

Commit

Permalink
bstats - Fix trying to compare enum value to string value for verbosi…
Browse files Browse the repository at this point in the history
…ty and event priority (#7027)

* Fix trying to compare enum value to string value for verbosity and event priority

* wrong polarity for var/command case sensitivity
  • Loading branch information
sovdeeth authored Sep 21, 2024
1 parent c11551f commit 3e3f0a9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/org/skriptlang/skript/bukkit/SkriptMetrics.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,14 @@ public static void setupMetrics(Metrics metrics) {

metrics.addCustomChart(new DrilldownPie("drilldownLogVerbosity", () -> {
String verbosity = SkriptConfig.verbosity.value().name().toLowerCase(Locale.ENGLISH).replace('_', ' ');
return isDefaultMap(verbosity, SkriptConfig.verbosity.defaultValue());
String defaultValue = SkriptConfig.verbosity.defaultValue().name().toLowerCase(Locale.ENGLISH).replace('_', ' ');
return isDefaultMap(verbosity, defaultValue);
}));

metrics.addCustomChart(new DrilldownPie("drilldownPluginPriority", () -> {
String priority = SkriptConfig.defaultEventPriority.value().name().toLowerCase(Locale.ENGLISH).replace('_', ' ');
return isDefaultMap(priority, SkriptConfig.defaultEventPriority.defaultValue());
String defaultValue = SkriptConfig.defaultEventPriority.defaultValue().name().toLowerCase(Locale.ENGLISH).replace('_', ' ');
return isDefaultMap(priority, defaultValue);
}));
metrics.addCustomChart(new SimplePie("cancelledByDefault", () ->
SkriptConfig.listenCancelledByDefault.value().toString()
Expand All @@ -143,10 +145,10 @@ public static void setupMetrics(Metrics metrics) {
SkriptConfig.caseSensitive.value().toString()
));
metrics.addCustomChart(new SimplePie("caseSensitiveVariables", () ->
SkriptConfig.caseInsensitiveVariables.value().toString()
String.valueOf(!SkriptConfig.caseInsensitiveVariables.value())
));
metrics.addCustomChart(new SimplePie("caseSensitiveCommands", () ->
SkriptConfig.caseInsensitiveCommands.value().toString()
String.valueOf(!SkriptConfig.caseInsensitiveCommands.value())
));

metrics.addCustomChart(new SimplePie("disableSaveWarnings", () ->
Expand Down

0 comments on commit 3e3f0a9

Please sign in to comment.