restrict if condition
Some checks failed
Build / Explore-Gitea-Actions (push) Failing after 34s

This commit is contained in:
ThePindabaas
2026-07-09 19:53:26 +02:00
parent 55881630bc
commit 7bbc3ea20b

View File

@@ -73,7 +73,7 @@ public class GriefAlert extends JavaPlugin implements Listener {
} }
} }
// If we see a break before a placement, stop (block is gone) // If we see a break before a placement, stop (block is gone)
if (parseResult.getActionId() == 0) { if (parseResult.getActionId() == 0 && !parseResult.isRolledBack()) {
break; break;
} }
} }
@@ -280,6 +280,7 @@ public class GriefAlert extends JavaPlugin implements Listener {
String worldName = event.getBlock().getWorld().getName(); String worldName = event.getBlock().getWorld().getName();
// Check if grief // Check if grief
debugInspectBlock(event.getBlock(), event.getPlayer());
String target = inspectBlock(event.getBlock(), event.getPlayer()); String target = inspectBlock(event.getBlock(), event.getPlayer());
if (target != null) { if (target != null) {
String message = ChatColor.GRAY + playerName + " broke " + blockType + " placed by " + target + " at " + x + " " + y + " " + z + getHumanWorldName(worldName); String message = ChatColor.GRAY + playerName + " broke " + blockType + " placed by " + target + " at " + x + " " + y + " " + z + getHumanWorldName(worldName);