Fix all bugs reported by findbugs plugins in NoxCore.

Majority was NPE's