Fixed NPE in last commit

This commit is contained in:
Wizjany 2011-06-11 16:23:45 -04:00
parent d971389746
commit d9aeb6afaa

View File

@ -382,7 +382,8 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
event.setCancelled(true);
return;
}
if (item.getData().getItemType() == Material.INK_SACK
if (item.getType() == Material.INK_SACK
&& item.getData() != null
&& item.getData().getData() == 15 // bonemeal
&& type == Material.GRASS) {
if (!plugin.getGlobalRegionManager().hasBypass(player, world)