fixed
This commit is contained in:
parent
9706c830e4
commit
cf9a84e935
@ -15,12 +15,12 @@ public class EntityRunnable {
|
|||||||
public EntityRunnable() {
|
public EntityRunnable() {
|
||||||
this.main.getServer().getScheduler().runTaskTimerAsynchronously(this.main, () -> {
|
this.main.getServer().getScheduler().runTaskTimerAsynchronously(this.main, () -> {
|
||||||
for (Player player : this.main.getServer().getOnlinePlayers()) {
|
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)) {
|
if (!player.hasPotionEffect(PotionEffectType.INVISIBILITY)) {
|
||||||
continue;
|
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) {
|
for (Entity entity : nearbyEntities) {
|
||||||
if (!(entity instanceof Creature)) {
|
if (!(entity instanceof Creature)) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user