mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-26 04:45:11 -06:00
No need for logging, thanks ceik
This commit is contained in:
parent
dbcc67bd94
commit
1485ee9275
1 changed files with 3 additions and 6 deletions
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue