No need for logging, thanks ceik

This commit is contained in:
Player Name 2026-06-10 15:56:09 +02:00
parent dbcc67bd94
commit 1485ee9275

View file

@ -17,7 +17,6 @@ import core.game.node.entity.player.link.TeleportManager;
import core.game.node.entity.skill.Skills;
import core.game.system.task.Pulse;
import core.game.world.map.zone.ZoneRestriction;
import core.tools.Log;
import org.jetbrains.annotations.NotNull;
import core.game.world.GameWorld;
import core.game.world.map.Location;
@ -34,8 +33,6 @@ import core.game.system.timer.TimerRegistry;
import java.util.*;
import static core.api.ContentAPIKt.log;
/**
* An entity is a movable node, such as players and NPCs.
* @author Emperor
@ -239,9 +236,9 @@ public abstract class Entity extends Node {
*/
public void clear() {
active = false;
if (location == null) {
log(getClass(), Log.ERR, "Null location when clearing Entity " + getId());
} else {
if (location != null) {
// Location can be null if the Entity never got init()ed, for example if NPC(...) was called only to show a face during dialogues.
// In that situation, the NPC never actually got created so it doesn't need to be removed from any chunk. If it had been, however, we do so now.
if (this instanceof Player) {
location.getChunk().removePlayer(asPlayer());
}