fixed bug in FightDetector

This commit is contained in:
2025-07-19 15:57:58 +02:00
parent 44dae51e1c
commit 337727b0f0

View File

@ -66,7 +66,7 @@ public class FightDetector extends Appliance {
VaroTeam otherTeam = this.queryAppliance(Teams.class).getTeamFromPlayer(otherPlayer.getUniqueId()); VaroTeam otherTeam = this.queryAppliance(Teams.class).getTeamFromPlayer(otherPlayer.getUniqueId());
if (otherTeam == null || ownTeam.equals(otherTeam)) continue; if (otherTeam == null || ownTeam.equals(otherTeam)) continue;
if(player.getLocation().getWorld().equals(otherPlayer.getLocation().getWorld())) continue; if(!player.getLocation().getWorld().equals(otherPlayer.getLocation().getWorld())) continue;
if (player.getLocation().distance(otherPlayer.getLocation()) <= BLOCK_RADIUS) { if (player.getLocation().distance(otherPlayer.getLocation()) <= BLOCK_RADIUS) {
this.setInFight(ownTeam); this.setInFight(ownTeam);