mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-01-10 02:07:43 +01:00
Merge pull request #2289 from Multiverse/ammed_bstats
Correct Metric Reports
This commit is contained in:
commit
3afca50930
@ -8,7 +8,7 @@ import com.dumptruckman.minecraft.util.Logging;
|
|||||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||||
import com.onarandombox.MultiverseCore.api.MVWorldManager;
|
import com.onarandombox.MultiverseCore.api.MVWorldManager;
|
||||||
import com.onarandombox.MultiverseCore.api.MultiverseWorld;
|
import com.onarandombox.MultiverseCore.api.MultiverseWorld;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.WordUtils;
|
||||||
import org.bstats.bukkit.Metrics;
|
import org.bstats.bukkit.Metrics;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
|
||||||
@ -60,7 +60,8 @@ public class MetricsConfigurator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getGeneratorName(MultiverseWorld world) {
|
private String getGeneratorName(MultiverseWorld world) {
|
||||||
return world.getGenerator() != null ? world.getGenerator() : NO_GENERATOR_NAME;
|
String gen = world.getGenerator();
|
||||||
|
return (gen != null && !gen.equalsIgnoreCase("null")) ? gen : NO_GENERATOR_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addEnvironmentsMetric() {
|
private void addEnvironmentsMetric() {
|
||||||
@ -73,7 +74,7 @@ public class MetricsConfigurator {
|
|||||||
|
|
||||||
private String titleCaseEnv(World.Environment env) {
|
private String titleCaseEnv(World.Environment env) {
|
||||||
String envName = env.name().replaceAll("_+", " ");
|
String envName = env.name().replaceAll("_+", " ");
|
||||||
return StringUtils.capitalize(envName.toLowerCase());
|
return WordUtils.capitalizeFully(envName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addWorldCountMetric() {
|
private void addWorldCountMetric() {
|
||||||
|
Loading…
Reference in New Issue
Block a user