From d4cf7390819278166a3435e47145face86d32f2d Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Thu, 10 Sep 2015 19:56:33 +0200 Subject: [PATCH] Fix hikari --- src/main/java/fr/xephi/authme/AuthMe.java | 1 - .../fr/xephi/authme/datasource/MySQL.java | 1 - .../authme/datasource/SQLite_HIKARI.java | 3 +-- .../authme/listener/AuthMePlayerListener.java | 2 -- src/main/resources/config.yml | 26 +++---------------- 5 files changed, 4 insertions(+), 29 deletions(-) diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index 7748ebd70..7257d4d59 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -7,7 +7,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; -import java.lang.reflect.InvocationTargetException; import java.net.URL; import java.net.URLConnection; import java.sql.SQLException; diff --git a/src/main/java/fr/xephi/authme/datasource/MySQL.java b/src/main/java/fr/xephi/authme/datasource/MySQL.java index e477ea4da..f30b76565 100644 --- a/src/main/java/fr/xephi/authme/datasource/MySQL.java +++ b/src/main/java/fr/xephi/authme/datasource/MySQL.java @@ -124,7 +124,6 @@ public class MySQL implements DataSource { HikariConfig config = new HikariConfig(); config.setPoolName("AuthMeMYSQLPool"); config.setDataSourceClassName("com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"); - config.setDriverClassName("com.mysql.jdbc.Driver"); config.setJdbcUrl("jdbc:mysql://" + this.host + ":" + this.port + "/" + this.database); config.setUsername(this.username); config.setPassword(this.password); diff --git a/src/main/java/fr/xephi/authme/datasource/SQLite_HIKARI.java b/src/main/java/fr/xephi/authme/datasource/SQLite_HIKARI.java index 602dec5f8..0a9eac077 100644 --- a/src/main/java/fr/xephi/authme/datasource/SQLite_HIKARI.java +++ b/src/main/java/fr/xephi/authme/datasource/SQLite_HIKARI.java @@ -115,14 +115,13 @@ public class SQLite_HIKARI implements DataSource { @Override public DataSourceType getType() { - return DataSourceType.SQLITE; + return DataSourceType.SQLITEHIKARI; } private synchronized void setConnectionArguments() throws ClassNotFoundException, IllegalArgumentException { HikariConfig config = new HikariConfig(); config.setPoolName("AuthMeSQLitePool"); - config.setDriverClassName("org.sqlite.JDBC"); config.setDataSourceClassName("org.sqlite.javax.SQLiteConnectionPoolDataSource"); config.setJdbcUrl("jdbc:sqlite:plugins/AuthMe/" + database + ".db"); config.setInitializationFailFast(true); // Don't start the plugin if the database is unavariable diff --git a/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java b/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java index 6ffde849b..cffd68507 100644 --- a/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java +++ b/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java @@ -3,10 +3,8 @@ package fr.xephi.authme.listener; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException; -import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.List; import java.util.concurrent.ConcurrentHashMap; import java.util.regex.PatternSyntaxException; diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 768ce22f3..dda0cb84c 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -39,26 +39,6 @@ DataSource: mySQLlastlocWorld: world # Column for RealName mySQLRealName: realname -GroupOptions: - # if you want to set up a particulary Permission Group for - # users that arent registered yet. Pay attention this option - # is casesensitive! - # Example: UnregisteredPlayerGroup: GuestUser - UnregisteredPlayerGroup: '' - # Same as UnregisteredGroup if u want to set a switch - # between unregistered and registered player group - # set the group name below - RegisteredPlayerGroup: '' - # with this option you can add specified permission onJoin - # like for example LoginBonus from another plugins, AuthMe - # will check onJoin if player has that permissions in his Group - # if true it add a temporany permissions to that user. This Field - # is needed beacuse AuthMe switch all unlogged players on a - # specified restricted Permission Group, so plugins that will use - # some particolary permissions on join doesnt work, without - # compiling option below! - Permissions: - PermissionsOnJoin: [] settings: sessions: # Do you want to enable session? When enabled @@ -290,10 +270,10 @@ ExternalBoardOptions: # WordPress prefix defined during WordPress installation process wordpressTablePrefix: 'wp_' permission: - # take care with this options, if u dont want + # Take care with this options, if you dont want # to use Vault and Group Switching of - # AuthMe for unloggedIn players put False - # below, default is true. + # AuthMe for unloggedIn players put true + # below, default is false. EnablePermissionCheck: false BackupSystem: # Enable or Disable Automatic Backup