run-task
run-task copied to clipboard
Option to disable bStats
This is set up by default in Bukkit, Spigot and Paper servers, but isn't really appropriate for a development and testing environment, unless bStats integration is what you're testing. Docs here: https://bstats.org/getting-started
Is there a way to automatically disable bStats when starting the server?
tasks.runServer {
doFirst {
val cfg = runDirectory.get().asFile().resolve("plugins/bStats/config.yml")
if (!cfg.exists()) {
cfg.writeText("enabled: false\n")
cfg.parentFile.mkdirs()
}
}
}