Do not add the entity as viewer multiple time

This commit is contained in:
themode 2020-11-04 19:16:47 +01:00
parent f85b2c4aad
commit 7b6f4b365b

View File

@ -1500,7 +1500,7 @@ public class Player extends LivingEntity implements CommandSender {
entity.addViewer(this);
}
if (entity instanceof Player && entity.isAutoViewable()) {
if (entity instanceof Player && entity.isAutoViewable() && !viewers.contains(entity)) {
addViewer((Player) entity);
}
});