From 0672ab0b7e41deb12a729ae6e23eac6ecd64123f Mon Sep 17 00:00:00 2001 From: acrylic-style Date: Mon, 29 Jul 2024 12:47:01 +0900 Subject: [PATCH] fix: cancel event --- build.gradle.kts | 2 +- .../java/com/github/mori01231/lifecore/command/BlockListener.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index fc891f2..98a5e72 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } group = "net.azisaba" -version = "1.15.2+6.16.5" +version = "1.15.2+6.16.6" java { toolchain.languageVersion.set(JavaLanguageVersion.of(8)) diff --git a/src/main/java/com/github/mori01231/lifecore/command/BlockListener.kt b/src/main/java/com/github/mori01231/lifecore/command/BlockListener.kt index 0c0803a..2a318bd 100644 --- a/src/main/java/com/github/mori01231/lifecore/command/BlockListener.kt +++ b/src/main/java/com/github/mori01231/lifecore/command/BlockListener.kt @@ -12,6 +12,7 @@ object BlockListener : Listener { if (ItemUtil.containsTag(e.itemInHand, "backup") && !e.player.isSneaking) { e.player.sendMessage("${ChatColor.RED}このブロックを設置すると中身のアイテムが変質し、元の状態に戻らなくなる可能性があります。") e.player.sendMessage("${ChatColor.RED}この警告を無視して設置したい場合はスニークしながら設置してください。") + e.isCancelled = true } } }