Skip to content
Permalink
Browse files

Bump bStats, and don't reference the class directly to prevent it bre…

…aking when bStats break their repo
  • Loading branch information
me4502 committed Jan 27, 2020
1 parent 579bf37 commit 03ff484977a9047ced0310544e1424f14316d435
Showing with 5 additions and 6 deletions.
  1. +2 −2 build.gradle
  2. +3 −4 src/main/java/com/sk89q/craftbook/bukkit/CraftBookPlugin.java
@@ -103,7 +103,7 @@ allprojects {
compile 'net.milkbowl.vault:VaultAPI:1.6'
compile 'com.comphenix.protocol:ProtocolLib-API:4.4.0'
compile 'fr.neatmonster:nocheatplus:3.15.1-RC'
compile 'org.bstats:bstats-bukkit:1.5'
compile 'org.bstats:bstats-bukkit:1.7'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.powermock', name: 'powermock-api-mockito', version: '1.6.1'
testCompile group: 'org.powermock', name: 'powermock-module-junit4', version: '1.6.1'
@@ -148,7 +148,7 @@ allprojects {
include(dependency('io.papermc:paperlib'))
include(dependency('com.sk89q:squirrelid'))
relocate ("org.bstats", "com.sk89q.craftbook.bukkit.bstats") {
include(dependency("org.bstats:bstats-bukkit:1.5"))
include(dependency("org.bstats:bstats-bukkit:1.7"))
}
}
relocate 'com.sk89q.squirrelid', 'com.sk89q.craftbook.util.profile'
@@ -104,7 +104,6 @@
import com.sk89q.util.yaml.YAMLProcessor;
import com.sk89q.wepif.PermissionsResolverManager;
import io.papermc.lib.PaperLib;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Chunk;
@@ -722,11 +721,11 @@ else if (String.valueOf(date).endsWith("3"))

try {
logDebugMessage("Initializing Metrics!", "startup");
Metrics metrics = new Metrics(this);
org.bstats.bukkit.Metrics metrics = new org.bstats.bukkit.Metrics(this, 3319);

metrics.addCustomChart(new Metrics.AdvancedPie("language",
metrics.addCustomChart(new org.bstats.bukkit.Metrics.AdvancedPie("language",
() -> languageManager.getLanguages().stream().collect(Collectors.toMap(Function.identity(), o -> 1))));
metrics.addCustomChart(new Metrics.SimpleBarChart("enabled_mechanics",
metrics.addCustomChart(new org.bstats.bukkit.Metrics.SimpleBarChart("enabled_mechanics",
() -> mechanics.stream().collect(Collectors.toMap(mech -> mech.getClass().getSimpleName(), o -> 1))));
} catch (Throwable e1) {
CraftBookBukkitUtil.printStacktrace(e1);

0 comments on commit 03ff484

Please sign in to comment.
You can’t perform that action at this time.