Fix Null Pointer
Some checks failed
Herobrine-Rewoven/pipeline/head There was a failure building this commit
Some checks failed
Herobrine-Rewoven/pipeline/head There was a failure building this commit
This commit is contained in:
parent
636a1556c6
commit
c7b361b5c0
@ -198,7 +198,8 @@ public class HerobrineEntity extends LivingEntity implements Monster {
|
||||
reset = true;
|
||||
List<? extends PlayerEntity> players = getEntityWorld().getPlayers();
|
||||
Collections.shuffle(players);
|
||||
if (players.size() > 0 || getNearestPlayer().distanceTo(this) >= HardcodedConfig.HEROBRINE_MAX_DISTANCE) {
|
||||
PlayerentityPlayerentity nearest = getNearestPlayer();
|
||||
if (players.size() > 0 || nearest == null || nearest.distanceTo(this) >= HardcodedConfig.HEROBRINE_MAX_DISTANCE) {
|
||||
for (PlayerEntity player : players) {
|
||||
if (player.isAlive()) {
|
||||
getAI().setStage(new TeleportStage(this, player.getUuid()));
|
||||
|
Reference in New Issue
Block a user