fixed
This commit is contained in:
parent
2998bbf24b
commit
9706c830e4
2
pom.xml
2
pom.xml
@ -74,7 +74,7 @@
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.20</version>
|
||||
<version>1.18.30</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -4,6 +4,7 @@ import com.loganmagnan.invisibleplayers.InvisiblePlayers;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -14,6 +15,10 @@ public class EntityRunnable {
|
||||
public EntityRunnable() {
|
||||
this.main.getServer().getScheduler().runTaskTimerAsynchronously(this.main, () -> {
|
||||
for (Player player : this.main.getServer().getOnlinePlayers()) {
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user