Updated bStats

This commit is contained in:
Auxilor
2021-08-06 21:30:29 +01:00
parent 02ed583674
commit 06e0ec0295
7 changed files with 38 additions and 5 deletions

View File

@@ -20,7 +20,6 @@ import com.willfp.eco.core.web.UpdateChecker;
import lombok.Getter;
import org.apache.commons.lang.Validate;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.event.Listener;
@@ -348,7 +347,7 @@ public abstract class EcoPlugin extends JavaPlugin {
}
if (this.getBStatsId() != 0) {
new Metrics(this, this.getBStatsId());
Eco.getHandler().registerBStats(this);
}
Set<String> enabledPlugins = Arrays.stream(Bukkit.getPluginManager().getPlugins()).map(Plugin::getName).collect(Collectors.toSet());

View File

@@ -168,4 +168,11 @@ public interface Handler {
* @return The FastItemStack.
*/
FastItemStack createFastItemStack(@NotNull ItemStack itemStack);
/**
* Register bStats metrics.
*
* @param plugin The plugin.
*/
void registerBStats(@NotNull EcoPlugin plugin);
}