changed Armorstand Logic #3

Merged
Kleedje30 merged 2 commits from armorstand-DeathLogic into main 2026-06-27 14:38:18 +00:00
Showing only changes of commit 4e65e1bcb2 - Show all commits

View File

@@ -272,9 +272,10 @@ public class GriefAlert extends JavaPlugin implements Listener {
// Armor Stand break alerts
@EventHandler(ignoreCancelled = true)
public void onArmorStandBreak(EntityDamageByEntityEvent event) {
public void onArmorStandBreak(EntityDeathEvent event) {
if (!(event.getEntity() instanceof ArmorStand armorStand)) return;
if (!(event.getDamager() instanceof Player player)) return;
Player player = armorStand.getKiller();
if(player == null) return;
int x = armorStand.getLocation().getBlockX();
int y = armorStand.getLocation().getBlockY();
int z = armorStand.getLocation().getBlockZ();