Skip to content

Commit

Permalink
Add KillAura GameMode check
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Dec 15, 2024
1 parent d38558a commit 6c84de7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.soulfiremc.server.data.EntityType;
import com.soulfiremc.server.protocol.BotConnection;
import com.soulfiremc.server.protocol.SFProtocolConstants;
import com.soulfiremc.server.protocol.bot.state.entity.AbstractClientPlayer;
import com.soulfiremc.server.protocol.bot.state.entity.Entity;
import com.soulfiremc.server.protocol.bot.state.entity.LivingEntity;
import com.soulfiremc.server.util.mcstructs.AABB;
Expand Down Expand Up @@ -248,6 +249,10 @@ public Entity getClosestEntity(
continue;
}

if (onlyInteractable && entity instanceof AbstractClientPlayer acp && (acp.isCreative() || acp.isSpectator())) {
continue;
}

if (whitelistedUser != null
&& !whitelistedUser.isEmpty()
&& entity.entityType() == EntityType.PLAYER) {
Expand Down

0 comments on commit 6c84de7

Please sign in to comment.