OSDN Git Service

Fixes for Automatic startup
[automap/automap.git] / Automap / Subsystems / AutomapSystem.cs
index 249151c..2e35db3 100644 (file)
@@ -81,14 +81,6 @@ namespace Automap
 
                        //Listen on bus for commands
                        ClientAPI.Event.RegisterEventBusListener(CommandListener, 1.0, AutomapSystem.AutomapCommandEventKey);
-
-
-                       if (configuration.Autostart)
-                       {
-                               CurrentState = CommandType.Run;
-                               Logger.Notification("Autostart is Enabled.");
-                       }
-
                }
 
 
@@ -124,6 +116,10 @@ namespace Automap
                        };
 
                        ClientAPI.Event.RegisterGameTickListener(ThreadDecider, 6000);
+
+                       if (configuration.Autostart) {
+                               CurrentState = CommandType.Run;
+                       }
                }
 
                private void ChunkAChanging(Vec3i chunkCoord, IWorldChunk chunk, EnumChunkDirtyReason reason)
@@ -886,7 +882,7 @@ namespace Automap
                }
 
                return null;
-               }
+               }                       
        }
 
 }