NPE check in PlayerInteract

This commit is contained in:
snowleo 2011-07-23 19:13:05 +02:00
parent dc0ca35017
commit 7aea9e71e8

View File

@ -28,6 +28,10 @@ public class SignPlayerListener extends PlayerListener
} }
final Block block = event.getClickedBlock(); final Block block = event.getClickedBlock();
if (block == null)
{
return;
}
final int mat = block.getTypeId(); final int mat = block.getTypeId();
if (mat == Material.SIGN_POST.getId() || mat == Material.WALL_SIGN.getId()) if (mat == Material.SIGN_POST.getId() || mat == Material.WALL_SIGN.getId())
{ {