mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
progress on new metrics
This commit is contained in:
parent
d037263e3f
commit
3e68af06ea
11 changed files with 141 additions and 47 deletions
|
|
@ -23,6 +23,7 @@ import xyz.alexcrea.cuanvil.update.ModrinthUpdateChecker
|
|||
import xyz.alexcrea.cuanvil.update.PluginSetDefault
|
||||
import xyz.alexcrea.cuanvil.update.UpdateHandler
|
||||
import xyz.alexcrea.cuanvil.util.Metrics
|
||||
import xyz.alexcrea.cuanvil.util.MetricsUtil
|
||||
import java.io.File
|
||||
import java.io.FileReader
|
||||
import java.util.logging.Level
|
||||
|
|
@ -34,7 +35,6 @@ open class CustomAnvil : JavaPlugin() {
|
|||
|
||||
companion object {
|
||||
// pluginIDS
|
||||
private const val bstatsPluginId = 20923
|
||||
private const val modrinthPluginID = "S75Ueiq9"
|
||||
|
||||
// Permission string required to use the plugin's features
|
||||
|
|
@ -156,15 +156,17 @@ open class CustomAnvil : JavaPlugin() {
|
|||
}
|
||||
|
||||
// Load metrics
|
||||
try {
|
||||
Metrics(this, bstatsPluginId)
|
||||
} catch (_: Exception) {}
|
||||
MetricsUtil.loadMetrics(this)
|
||||
|
||||
// Load other thing later.
|
||||
// It is so other dependent plugins can implement there event listener before we fire them.
|
||||
DependencyManager.scheduler.scheduleGlobally(this) { loadEnchantmentSystemDirty() }
|
||||
}
|
||||
|
||||
override fun onDisable() {
|
||||
MetricsUtil.shutdownMetrics()
|
||||
}
|
||||
|
||||
private fun loadEnchantmentSystemDirty() {
|
||||
try {
|
||||
loadEnchantmentSystem()
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ object ConfigOptions {
|
|||
// Path for config values
|
||||
// ----------------------
|
||||
|
||||
const val METRIC_TYPE = "metric_type"
|
||||
|
||||
const val CAP_ANVIL_COST = "limit_repair_cost"
|
||||
const val MAX_ANVIL_COST = "limit_repair_value"
|
||||
const val REMOVE_ANVIL_COST_LIMIT = "remove_repair_limit"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue