Reika_Mods_Issues
Reika_Mods_Issues copied to clipboard
[DragonAPI] PlayerPlaceBlockEvent.fireTryPlac() should not be called, when entityPlayer is null
Not all placeBlockAt() are executed by the player, so I recommend adding a non-null check before processing such as:
public static boolean fireTryPlace(World world, int x, int y, int z, Block b, int meta, int flags, int side, EntityPlayer ep, ItemStack is) {
if (ep != null && fire(world, x, y, z, side, b, meta, is, ep))
return false;
else
return world.setBlock(x, y, z, b, meta, flags);
}