From 00add4f1a821dd97b94b06707709ffe96a0ec32d Mon Sep 17 00:00:00 2001 From: kuroppoi <68156848+kuroppoi@users.noreply.github.com> Date: Sat, 30 Jul 2022 02:57:58 +0200 Subject: [PATCH] Save generated zone immediately so chunks are reloaded properly --- .../gameserver/command/commands/GenerateZoneCommand.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gameserver/src/main/java/brainwine/gameserver/command/commands/GenerateZoneCommand.java b/gameserver/src/main/java/brainwine/gameserver/command/commands/GenerateZoneCommand.java index c608fd8..6adbd53 100644 --- a/gameserver/src/main/java/brainwine/gameserver/command/commands/GenerateZoneCommand.java +++ b/gameserver/src/main/java/brainwine/gameserver/command/commands/GenerateZoneCommand.java @@ -7,6 +7,7 @@ import brainwine.gameserver.command.Command; import brainwine.gameserver.command.CommandExecutor; import brainwine.gameserver.zone.Biome; import brainwine.gameserver.zone.Zone; +import brainwine.gameserver.zone.ZoneManager; import brainwine.gameserver.zone.gen.ZoneGenerator; public class GenerateZoneCommand extends Command { @@ -82,7 +83,9 @@ public class GenerateZoneCommand extends Command { if(zone == null) { executor.notify("An unexpected error occured while generating your zone.", ALERT); } else { - GameServer.getInstance().getZoneManager().addZone(zone); + ZoneManager zoneManager = GameServer.getInstance().getZoneManager(); + zoneManager.addZone(zone); + zoneManager.saveZone(zone); executor.notify(String.format("Your zone '%s' is ready for exploration!", zone.getName()), ALERT); } });