Fix 1.21 config being wrong:

fix 1.21 config updater and automatically repair previously broken config version:
- Allow 1.21 enchantment in enchantment book
- Add unit repair of mace with breeze rod

Also version up
This commit is contained in:
alexcrea 2024-09-18 12:32:17 +02:00
parent 14fd247b0b
commit f4f467f6fe
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F
10 changed files with 173 additions and 16 deletions

View file

@ -16,6 +16,7 @@ import xyz.alexcrea.cuanvil.gui.util.GuiSharedConstant
import xyz.alexcrea.cuanvil.listener.ChatEventListener
import xyz.alexcrea.cuanvil.update.PluginSetDefault
import xyz.alexcrea.cuanvil.update.Update_1_21
import xyz.alexcrea.cuanvil.update.plugin.PluginUpdates
import xyz.alexcrea.cuanvil.util.Metrics
import java.io.File
import java.io.FileReader
@ -136,6 +137,9 @@ class CustomAnvil : JavaPlugin() {
// temporary: handle 1.21 update
Update_1_21.handleUpdate()
// plugin configuration updates
PluginUpdates.handlePluginUpdate()
// Register enchantment of compatible plugin and load configuration change.
DependencyManager.handleCompatibilityConfig()

View file

@ -21,7 +21,7 @@ object PacketManagerSelector {
NoPacketManager()
private val versionSpecificManager: PacketManagerBase?
get() {
val versionParts = UpdateUtils.currentMinecraftVersion()
val versionParts = UpdateUtils.currentMinecraftVersionArray()
if (versionParts[0] != 1) return null
return when (versionParts[1]) {