mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-22 16:39:25 +00:00
Made the boss instantly target the nearest player
This commit is contained in:
@@ -508,6 +508,12 @@ public class EcoBoss extends PluginDependent {
|
|||||||
}
|
}
|
||||||
}).runTaskTimer(0, 1);
|
}).runTaskTimer(0, 1);
|
||||||
|
|
||||||
|
for (Entity nearbyEntity : entity.getNearbyEntities(15, 15, 15)) {
|
||||||
|
if (nearbyEntity instanceof Player && entity instanceof Mob) {
|
||||||
|
((Mob) entity).setTarget((LivingEntity) nearbyEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isBossbarEnabled()) {
|
if (this.isBossbarEnabled()) {
|
||||||
createBossBar(entity);
|
createBossBar(entity);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user