Skip to content

Commit

Permalink
Fix ghost entry snitches
Browse files Browse the repository at this point in the history
  • Loading branch information
iykHvfIvfR authored and iykHvfIvfR committed Jul 7, 2017
1 parent 6f49f33 commit 39ed298
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -392,20 +392,15 @@ public void breakSnitchBlock(BlockBreakEvent event) {
+ " and is on group: " + snitch.getGroup().getName());
}
}
if (!block.getType().equals(Material.JUKEBOX)) {
return;
}
if (vanishNoPacket.isPlayerInvisible(event.getPlayer())
|| event.getPlayer().hasPermission("jukealert.vanish")) {
return;
}
Location loc = block.getLocation();
if (snitchManager.getSnitch(loc.getWorld(), loc) != null) {
Snitch snitch = snitchManager.getSnitch(loc.getWorld(), loc);
if (snitch.shouldLog()) {
plugin.getJaLogger().logSnitchBreak(loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(),
loc.getBlockZ());
}
plugin.getJaLogger().logSnitchBreak(loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(),
loc.getBlockZ());
snitchManager.removeSnitch(snitch);
}
}
Expand Down

0 comments on commit 39ed298

Please sign in to comment.