Merge pull request #10 from Fysac/master

Null pointer check
Better way to get inventory. This prevents problems with other plugins.
Add support for CB 1.8 R1