Skip to content

Commit 19c0b46

Browse files
authored
Fix the player not being able to harm himself while on a team (#353)
1 parent fec8baa commit 19c0b46

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/xyz/nucleoid/plasmid/api/game/common/team/TeamManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ private EventResult onDamagePlayer(ServerPlayer player, DamageSource source, flo
339339
var playerTeam = this.teamFor(player);
340340
var attackerTeam = this.teamFor(attacker);
341341

342-
if (playerTeam != null && playerTeam == attackerTeam && !this.getTeamConfig(playerTeam).friendlyFire()) {
342+
if (playerTeam != null && playerTeam == attackerTeam && !player.equals(attacker) && !this.getTeamConfig(playerTeam).friendlyFire()) {
343343
return EventResult.DENY;
344344
}
345345
}

0 commit comments

Comments
 (0)