From 859307f3ea8c40ffbc2a650dc8be1b5401e292fb Mon Sep 17 00:00:00 2001 From: Robin Kupper Date: Thu, 23 Jun 2011 18:53:41 +0200 Subject: [PATCH] Fixed npe --- src/de/diddiz/LogBlock/LBToolListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/diddiz/LogBlock/LBToolListener.java b/src/de/diddiz/LogBlock/LBToolListener.java index 9f7a68d..f008dd4 100644 --- a/src/de/diddiz/LogBlock/LBToolListener.java +++ b/src/de/diddiz/LogBlock/LBToolListener.java @@ -29,7 +29,7 @@ class LBToolListener extends PlayerListener @Override public void onPlayerInteract(PlayerInteractEvent event) { - if (!event.isCancelled()) { + if (!event.isCancelled() && event.getMaterial() != null) { final Action action = event.getAction(); final int type = event.getMaterial().getId(); if (type == toolID && action == Action.RIGHT_CLICK_BLOCK || type == toolblockID && (action == Action.LEFT_CLICK_BLOCK || action == Action.RIGHT_CLICK_BLOCK)) {