优化TNT爆炸保护
This commit is contained in:
parent
ee470c6cad
commit
e6cea57dfe
@ -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))
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user