diff --git a/src/main/java/emu/grasscutter/game/world/Scene.java b/src/main/java/emu/grasscutter/game/world/Scene.java index 924a2a87f..498b112c7 100644 --- a/src/main/java/emu/grasscutter/game/world/Scene.java +++ b/src/main/java/emu/grasscutter/game/world/Scene.java @@ -511,6 +511,10 @@ public final class Scene { this.finishLoading(); this.checkPlayerRespawn(); if (this.tickCount++ % 10 == 0) this.broadcastPacket(new PacketSceneTimeNotify(this)); + if (this.getPlayerCount() <= 0 && !this.dontDestroyWhenEmpty) { + this.getScriptManager().onDestroy(); + this.getWorld().deregisterScene(this); + } } /** Validates a player's current position. Teleports the player if the player is out of bounds. */