Skip to content

Commit

Permalink
Catch Bukkit-induced error in 1.7 - placeblock
Browse files Browse the repository at this point in the history
Event is fired incorrectly every time... ignore it for now until Bukkit
fixes that.
  • Loading branch information
mcmonkey4eva committed Dec 1, 2013
1 parent 7ac56ae commit df8a9ce
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -225,6 +225,10 @@ public void blockBurn(BlockBurnEvent event) {
@EventHandler
public void blockCanBuild(BlockCanBuildEvent event) {

// TODO: Remove when Bukkit fixes error?
if (event.getMaterial() == null)
return;

Map<String, dObject> context = new HashMap<String, dObject>();
dMaterial oldMaterial = dMaterial.getMaterialFrom(event.getBlock().getType());
dMaterial newMaterial = dMaterial.getMaterialFrom(event.getMaterial());
Expand Down

0 comments on commit df8a9ce

Please sign in to comment.