mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
small fix
This commit is contained in:
parent
bd17d55346
commit
af2d2c45b6
1 changed files with 5 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ object DataPackDependency {
|
|||
*/
|
||||
private val LASTEST_VERSION = mapOf(
|
||||
Pair("bracken", Version(1, 11, 0)),
|
||||
Pair("neoenchant", Version(1, 13, 0))
|
||||
Pair("enchantplus", Version(1, 13, 0))
|
||||
)
|
||||
|
||||
val enabledDatapacks: List<String>
|
||||
|
|
@ -66,9 +66,12 @@ object DataPackDependency {
|
|||
private fun handlePackInitialConfig(pack: String) {
|
||||
val defConfig = ConfigHolder.DEFAULT_CONFIG
|
||||
val version = LASTEST_VERSION[pack]
|
||||
if(version == null) {
|
||||
throw RuntimeException("The pack $pack has no latest version hard coded in the plugin")
|
||||
}
|
||||
|
||||
val currentVersion = Version.fromString(defConfig.config.getString("datapack.$pack"))
|
||||
if (currentVersion.greaterEqual(version!!)) {
|
||||
if (currentVersion.greaterEqual(version)) {
|
||||
handleEnchantAllConflict(pack)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue