Minor - make AuthMe.database private
- In favor of AuthMe.getDataSource()
This commit is contained in:
@@ -27,7 +27,7 @@ public class CrazyLoginConverter implements Converter {
|
||||
* @param sender CommandSender
|
||||
*/
|
||||
public CrazyLoginConverter(AuthMe instance, CommandSender sender) {
|
||||
this.database = instance.database;
|
||||
this.database = instance.getDataSource();
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public class RoyalAuthConverter implements Converter {
|
||||
|
||||
public RoyalAuthConverter(AuthMe plugin) {
|
||||
this.plugin = plugin;
|
||||
this.data = plugin.database;
|
||||
this.data = plugin.getDataSource();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,16 +21,14 @@ public class SqliteToSql implements Converter {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (plugin.database.getType() != DataSourceType.MYSQL)
|
||||
{
|
||||
if (plugin.getDataSource().getType() != DataSourceType.MYSQL) {
|
||||
sender.sendMessage("Please config your mySQL connection and re-run this command");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
SQLite data = new SQLite();
|
||||
for (PlayerAuth auth : data.getAllAuths())
|
||||
{
|
||||
plugin.database.saveAuth(auth);
|
||||
for (PlayerAuth auth : data.getAllAuths()) {
|
||||
plugin.getDataSource().saveAuth(auth);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
sender.sendMessage(plugin.getMessages().retrieve(MessageKey.ERROR));
|
||||
|
||||
@@ -23,7 +23,7 @@ class vAuthFileReader {
|
||||
*/
|
||||
public vAuthFileReader(AuthMe plugin) {
|
||||
this.plugin = plugin;
|
||||
this.database = plugin.database;
|
||||
this.database = plugin.getDataSource();
|
||||
}
|
||||
|
||||
public void convert() {
|
||||
|
||||
@@ -30,7 +30,7 @@ class xAuthToFlat {
|
||||
*/
|
||||
public xAuthToFlat(AuthMe instance, CommandSender sender) {
|
||||
this.instance = instance;
|
||||
this.database = instance.database;
|
||||
this.database = instance.getDataSource();
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user