changed Armorstand Logic #3
@@ -274,8 +274,7 @@ public class GriefAlert extends JavaPlugin implements Listener {
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onArmorStandBreak(EntityDeathEvent event) {
|
||||
if (!(event.getEntity() instanceof ArmorStand armorStand)) return;
|
||||
Player player = armorStand.getKiller();
|
||||
if(player == null) return;
|
||||
if(!(event.getDamageSource().getCausingEntity() instanceof Player player)) return;
|
||||
int x = armorStand.getLocation().getBlockX();
|
||||
int y = armorStand.getLocation().getBlockY();
|
||||
int z = armorStand.getLocation().getBlockZ();
|
||||
@@ -289,6 +288,7 @@ public class GriefAlert extends JavaPlugin implements Listener {
|
||||
String message = ChatColor.GRAY + playerName + " broke an armor stand placed by " + target + " at " + x + " " + y + " " + z + getHumanWorldName(worldName);
|
||||
alert(message, playerName, "[Map Link](" + MAP_LINK + "/?worldname=" + worldName + "&zoom=7&x=" + x + "&y=" + y + "&z=" + z + ")", target, x, y, z, worldName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Armor Stand item interaction alerts
|
||||
|
||||
Reference in New Issue
Block a user