From e6cea57dfec937b05b8e4e8d9b915787ca87ad1f Mon Sep 17 00:00:00 2001 From: zhangyuheng Date: Sun, 11 Aug 2024 08:12:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96TNT=E7=88=86=E7=82=B8?= =?UTF-8?q?=E4=BF=9D=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 2 +- .../lunadeer/dominion/events_v1_20_1/EnvironmentEvents.java | 5 +---- .../cn/lunadeer/dominion/events_v1_21/EnvironmentEvents.java | 5 +---- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7f45b16..061bdac 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } group = "cn.lunadeer" -version = "2.1.3-beta" +version = "2.1.4-beta" java { toolchain.languageVersion.set(JavaLanguageVersion.of(21)) diff --git a/v1_20_1/src/main/java/cn/lunadeer/dominion/events_v1_20_1/EnvironmentEvents.java b/v1_20_1/src/main/java/cn/lunadeer/dominion/events_v1_20_1/EnvironmentEvents.java index d95e18f..a348dde 100644 --- a/v1_20_1/src/main/java/cn/lunadeer/dominion/events_v1_20_1/EnvironmentEvents.java +++ b/v1_20_1/src/main/java/cn/lunadeer/dominion/events_v1_20_1/EnvironmentEvents.java @@ -159,13 +159,10 @@ public class EnvironmentEvents implements Listener { }); } - @EventHandler(priority = EventPriority.HIGHEST) // tnt_explode - armor stand + @EventHandler(priority = EventPriority.HIGHEST) // tnt_explode - entity public void onArmorStandExplodedByTnt(EntityDamageByEntityEvent event) { Entity entity = event.getEntity(); Entity harmer = event.getDamager(); - if (entity.getType() != EntityType.ARMOR_STAND) { - return; - } if (harmer.getType() != EntityType.MINECART_TNT && harmer.getType() != EntityType.PRIMED_TNT) { return; } diff --git a/v1_21/src/main/java/cn/lunadeer/dominion/events_v1_21/EnvironmentEvents.java b/v1_21/src/main/java/cn/lunadeer/dominion/events_v1_21/EnvironmentEvents.java index 0878e15..b20a490 100644 --- a/v1_21/src/main/java/cn/lunadeer/dominion/events_v1_21/EnvironmentEvents.java +++ b/v1_21/src/main/java/cn/lunadeer/dominion/events_v1_21/EnvironmentEvents.java @@ -159,13 +159,10 @@ public class EnvironmentEvents implements Listener { }); } - @EventHandler(priority = EventPriority.HIGHEST) // tnt_explode - armor stand + @EventHandler(priority = EventPriority.HIGHEST) // tnt_explode - entity public void onArmorStandExplodedByTnt(EntityDamageByEntityEvent event) { Entity entity = event.getEntity(); Entity harmer = event.getDamager(); - if (entity.getType() != EntityType.ARMOR_STAND) { - return; - } if (harmer.getType() != EntityType.TNT_MINECART && harmer.getType() != EntityType.TNT) { return; }