Merge remote-tracking branch 'refs/remotes/origin/v1.x.x' into feature/genericnms

# Conflicts:
#	src/main/kotlin/xyz/alexcrea/cuanvil/dependency/gui/GuiTesterSelector.kt
This commit is contained in:
alexcrea 2025-12-25 22:09:24 +01:00
commit f5a89fea7c
Signed by: alexcrea
GPG key ID: E346CD16413450E3
25 changed files with 1665 additions and 104 deletions

View file

@ -19,8 +19,7 @@ import xyz.alexcrea.cuanvil.listener.AnvilResultListener
import xyz.alexcrea.cuanvil.listener.ChatEventListener
import xyz.alexcrea.cuanvil.listener.PrepareAnvilListener
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.update.UpdateHandler
import xyz.alexcrea.cuanvil.util.Metrics
import java.io.File
import java.io.FileReader
@ -145,7 +144,7 @@ open class CustomAnvil : JavaPlugin() {
}
// Handle minecraft and plugin updates
PluginUpdates.handleUpdates()
UpdateHandler.handleUpdates()
// Register enchantment of compatible plugin and load configuration change.
DependencyManager.handleCompatibilityConfig()

View file

@ -9,7 +9,7 @@ import xyz.alexcrea.cuanvil.api.event.CAConfigReadyEvent
import xyz.alexcrea.cuanvil.config.ConfigHolder
import xyz.alexcrea.cuanvil.dependency.DependencyManager
import xyz.alexcrea.cuanvil.gui.config.global.*
import xyz.alexcrea.cuanvil.update.plugin.PluginUpdates
import xyz.alexcrea.cuanvil.update.UpdateHandler
class ReloadExecutor : CommandExecutor {
override fun onCommand(sender: CommandSender, cmd: Command, cmdstr: String, args: Array<out String>): Boolean {
@ -49,7 +49,7 @@ class ReloadExecutor : CommandExecutor {
CustomRecipeConfigGui.getCurrentInstance()?.reloadValues()
// handle minecraft version update
PluginUpdates.handleMCVersionUpdate()
UpdateHandler.handleMCVersionUpdate()
// Handle dependency reload
DependencyManager.handleConfigReload()

View file

@ -60,6 +60,7 @@ object PacketManagerSelector {
5 -> V1_21R4_PacketManager()
6, 7, 8 -> V1_21R5_PacketManager()
9, 10 -> V1_21R6_PacketManager()
11 -> V1_21R7_PacketManager()
else -> null
}

View file

@ -213,7 +213,8 @@ class PrepareAnvilListener : Listener {
else if (useColor) it.displayName
else ChatColor.stripColor(it.displayName)
if (!displayName.contentEquals(renameText)) {
if (!displayName.contentEquals(renameText) && !(displayName == null && renameText == "")) {
it.setDisplayName(renameText)
resultItem.itemMeta = it