Don't spam no block type messages for doublesteps.

This commit is contained in:
Robin Kupper
2011-07-10 21:09:45 +02:00
parent 298448070b
commit 6365b64d47

View File

@@ -63,9 +63,9 @@ class LBBlockListener extends BlockListener
public void onBlockPlace(BlockPlaceEvent event) {
if (!event.isCancelled()) {
final int type = event.getBlock().getTypeId();
if (type == 0) {
if (type == 0 && event.getItemInHand().getTypeId() == 43 && event.getBlock().getFace(BlockFace.DOWN).getTypeId() != 43) {
final Location loc = event.getBlock().getLocation();
System.out.println("[LogBlock] Bukkit provided no block type for the block placed by " + event.getPlayer().getName() + " at " + loc.getWorld().getName() + ":" + loc.getBlockX() + ":" + loc.getBlockY() + loc.getBlockZ() + ". Please check the conditions this happened under, and report it to Diddiz or Bukkit.");
System.out.println("[LogBlock] Bukkit provided no block type for the block placed by " + event.getPlayer().getName() + " at " + loc.getWorld().getName() + ":" + loc.getBlockX() + ":" + loc.getBlockY() + ":" + loc.getBlockZ() + ". Please check the conditions this happened under, and report it to Diddiz or Bukkit.");
}
if (logSignTexts && (type == 63 || type == 68))
return;