Skip to content

Commit 8c879fb

Browse files
committed
Check early logger state before starting the game!
1 parent 673a8ee commit 8c879fb

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • launcher/src/main/java/com/fox2code/hypertale/launcher

launcher/src/main/java/com/fox2code/hypertale/launcher/Main.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,13 @@ private static void launchGame(String[] args, boolean dev) throws IOException {
263263
MixinLoader.initialize();
264264
HypertaleModLoader.loadHypertaleMods(modGatherer);
265265
MixinLoader.postInitialize();
266+
startHytale(args);
267+
}
268+
269+
static void startHytale(String... args) {
270+
if (!EarlyLogger.isDirectLogging()) {
271+
throw new IllegalStateException("Game looks already launched!");
272+
}
266273
if (HypertalePaths.hypertaleCacheJust.isFile() &&
267274
!HypertalePaths.hypertaleCacheJust.delete()) {
268275
EarlyLogger.log("Failed to delete \".hypertale/.just\"");

0 commit comments

Comments
 (0)