Skip to content

Commit

Permalink
update to 1.19.1 + more helpful errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNavaStar committed Jul 27, 2022
1 parent bd8138a commit c7cc00b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
Empty file modified InvSyncIcon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx4G
# Fabric Properties

# check these on https://fabricmc.net/develop/
minecraft_version=1.19
yarn_mappings=1.19+build.2
loader_version=0.14.7
minecraft_version=1.19.1
yarn_mappings=1.19.1+build.1
loader_version=0.14.8

# Mod Properties
mod_version=v2.3.0
mod_version=v2.3.1
maven_group=mrnavastar
archives_base_name=invsync

# Dependencies
fabric_version=0.55.3+1.19
sqlib_version=v1.3.1
fabric_version=0.58.5+1.19.1
sqlib_version=v1.3.2
microconfig_version=2.2.1
Empty file modified gradle/wrapper/gradle-wrapper.jar
100644 → 100755
Empty file.
7 changes: 7 additions & 0 deletions src/main/java/mrnavastar/invsync/InvSync.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;

import java.io.File;
import java.nio.file.Path;
import java.util.concurrent.TimeUnit;

public class InvSync implements ModInitializer {
Expand All @@ -33,6 +35,11 @@ public void onInitialize() {
settings = MicroConfig.getOrCreate(MODID, new Settings());

if (settings.DATABASE_TYPE.equals("SQLITE") && !settings.SQLITE_DIRECTORY.equals("/path/to/folder")) {
if (!new File(settings.SQLITE_DIRECTORY).exists()) {
log(Level.FATAL, "Halting initialization! " + settings.SQLITE_DIRECTORY + " does not exist!");
System.exit(0);
}

database = new SQLiteDatabase(settings.DATABASE_NAME, settings.SQLITE_DIRECTORY);
validConfig = true;
}
Expand Down

0 comments on commit c7cc00b

Please sign in to comment.