This commit is contained in:
Logan Magnan 2024-09-22 10:18:32 -04:00
parent 9706c830e4
commit cf9a84e935

View File

@ -15,12 +15,12 @@ public class EntityRunnable {
public EntityRunnable() {
this.main.getServer().getScheduler().runTaskTimerAsynchronously(this.main, () -> {
for (Player player : this.main.getServer().getOnlinePlayers()) {
List<Entity> nearbyEntities = player.getNearbyEntities(this.main.getMainConfig().getConfig().getInt("NEARBY-ENTITIES.RADIUS.X"), this.main.getMainConfig().getConfig().getInt("NEARBY-ENTITIES.RADIUS.Y"), this.main.getMainConfig().getConfig().getInt("NEARBY-ENTITIES.RADIUS.Z"));
if (!player.hasPotionEffect(PotionEffectType.INVISIBILITY)) {
continue;
}
List<Entity> nearbyEntities = player.getNearbyEntities(this.main.getMainConfig().getConfig().getInt("NEARBY-ENTITIES.RADIUS.X"), this.main.getMainConfig().getConfig().getInt("NEARBY-ENTITIES.RADIUS.Y"), this.main.getMainConfig().getConfig().getInt("NEARBY-ENTITIES.RADIUS.Z"));
for (Entity entity : nearbyEntities) {
if (!(entity instanceof Creature)) {
continue;