Check if entity is in any group before checking specific group

Would throw a NullPointerException at bag.getData() when entity is in no group.
Removes some overhead in comparison to calling isInAnyGroup() before every call to isInGroup()
as the bag is already fetched.

(ignore the lot of commits, had some problem with tab/space settings in my ide, had to keep reverting -.-')