修复潜影贝打掉地图的问题
All checks were successful
Java CI-CD with Maven / build (push) Successful in 11m7s

This commit is contained in:
zhangyuheng 2024-07-31 15:16:23 +08:00
parent 9e1ad7640a
commit 86d40fedb2
2 changed files with 7 additions and 7 deletions

View File

@ -6,7 +6,7 @@
<groupId>cn.lunadeer</groupId>
<artifactId>Dominion</artifactId>
<version>1.42.8-beta</version>
<version>1.42.9-beta</version>
<packaging>jar</packaging>
<name>Dominion</name>

View File

@ -53,24 +53,24 @@ public class EnvironmentEvents implements Listener {
if (entity.getType() != EntityType.ARMOR_STAND) {
return;
}
if (event.getDamager() instanceof Player) {
return;
}
DominionDTO dom = Cache.instance.getDominionByLoc(entity.getLocation());
checkFlag(dom, Flag.CREEPER_EXPLODE, event);
}
@EventHandler(priority = EventPriority.HIGHEST) // creeper_explode - other entity shoot
@EventHandler(priority = EventPriority.HIGHEST) // creeper_explode - other projectiles
public void removeSomeOnItemFrameByArrow(EntityDamageByEntityEvent event) {
Entity entity = event.getEntity();
if (!(entity instanceof ItemFrame)) {
return;
}
ItemFrame itemFrame = (ItemFrame) entity;
if (itemFrame.getItem().getType() == Material.AIR) {
if (!(event.getDamager() instanceof Projectile)) {
return;
}
if (!(event.getDamager() instanceof Arrow)) {
return;
}
Arrow arrow = (Arrow) event.getDamager();
Projectile arrow = (Projectile) event.getDamager();
if (arrow.getShooter() instanceof Player) {
return;
}