Skip to content

Commit

Permalink
Merge pull request #38 from iykHvfIvfR/pr19
Browse files Browse the repository at this point in the history
Fix ghost entry snitches
  • Loading branch information
ProgrammerDan authored Jul 8, 2017
2 parents 56b1283 + 39ed298 commit 9307d13
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -424,20 +424,15 @@ public void breakSnitchBlock(BlockBreakEvent event) {
}
}
}
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 9307d13

Please sign in to comment.