Skip to content

Commit

Permalink
Fixed: Database type not working in lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
Bram1903 committed Nov 1, 2024
1 parent 72bf52e commit 5a4e266
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static class ColorScheme {
@Getter
public static class Database {
@Comment("Database Type: The type of database to use. (SQLite, MYSQL)")
private Platform type = Platform.SQLITE;
private String type = String.valueOf(Platform.SQLITE);

@Comment("\nDatabase Host: The host of the database.")
private String host = "localhost";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public DatabaseManager(TotemGuard plugin) {

private DataSourceConfig createDataSourceConfig(Settings.Database settings, TotemGuard plugin) {
DataSourceConfig dataSourceConfig = new DataSourceConfig();
switch (settings.getType()) {
case SQLITE:
switch (settings.getType().toLowerCase()) {
case "sqlite":
configureSQLite(dataSourceConfig, plugin);
break;
case MYSQL:
case "mysql":
configureMySQL(dataSourceConfig, settings);
break;
default:
Expand Down

0 comments on commit 5a4e266

Please sign in to comment.