diff --git a/build.gradle.kts b/build.gradle.kts index 209ee22..cf4eca5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } group = "net.azisaba" -version = "1.15.2+6.16.8-SNAPSHOT" +version = "1.15.2+6.16.8" java { toolchain.languageVersion.set(JavaLanguageVersion.of(8)) diff --git a/src/main/java/com/github/mori01231/lifecore/command/LifeCoreUtilCommand.kt b/src/main/java/com/github/mori01231/lifecore/command/LifeCoreUtilCommand.kt index d2f2982..91a9a11 100644 --- a/src/main/java/com/github/mori01231/lifecore/command/LifeCoreUtilCommand.kt +++ b/src/main/java/com/github/mori01231/lifecore/command/LifeCoreUtilCommand.kt @@ -438,6 +438,24 @@ class LifeCoreUtilCommand(val plugin: LifeCore) : TabExecutor { MapUtil.initializeMapRenderer((player as Player), player.inventory.itemInMainHand) } }, + FixItem("displayタグを修正します") { + override fun execute(plugin: LifeCore, player: CommandSender, args: Array) { + val item = (player as Player).inventory.itemInMainHand + val meta = item.itemMeta + if (meta.hasDisplayName()) { + val origName = meta.displayName + meta.setDisplayName(null) + meta.setDisplayName(origName) + } + if (meta.hasLore()) { + val origLore = meta.lore + meta.lore = null + meta.lore = origLore + } + item.itemMeta = meta + player.inventory.setItemInMainHand(item) + } + }, ; abstract fun execute(plugin: LifeCore, player: CommandSender, args: Array)