Change perspective of team checking. Fixes BUKKIT-4044

The method's return value was being incorrectly calculated from the
perspective of this.canHurt(that), where it's actually used from the
this.canBeHurtBy(that) perspective.

Remapped by Srg2Source from Bukkit/CraftBukkit@07e33d03cfc9048c0fbc961cc7714e77f2bc0d37