So I can damage and be damaged by members of an allied gang of an allied gang of my gang, etc. It would be better I couldn't damage and be damaged by members of an allied gang of an allied gang of my gang, etc.. Spoiler: You don't really need it, but I wrote this Something like that in your gang class: Code: public List<UUID> getAllies() { List<UUID> allies = new ArrayList<>(); allies.addAll(getMembers()); getAlliedGangs().forEach(g -> { g.getAllies().forEach(ap -> { if(!allies.contains(ap)) { allies.add(ap); } }); }); return allies; } public boolean isAlly(UUID player) { return getAllies().contains(player); } And then in your EntityDamageByEntityEvent listener get damager's gang and do if(<gang>.isAlly(<damaged entity>.getUniqueId())) cancel the event and do your things like sending messages, etc. NOTE: I didn't see your gang class, so this code may be wrong. NOTE: You need to prevent cycling allied gangs.