mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-29 19:46:42 +00:00
Removal of Lombok
Lombok implementation removal. I have also gone through and replaced things with inline methods and variables, lambdas, and simplified loops down, removed unnecessary guard clauses, and overall cleaned up every single class. This took a long time, please do remember to follow proper naming conventions, don't include unnecessary guard clauses, follow exception rules and comment rules, and please PLEASE remember to use the DIAMOND OPERATOR rather than just inferring RAW TYPES!!! Thank you!!
This commit is contained in:
@ -8,9 +8,9 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.text.MessageFormat;
|
||||
import me.totalfreedom.totalfreedommod.FreedomService;
|
||||
import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||
import me.totalfreedom.totalfreedommod.banning.Ban;
|
||||
import me.totalfreedom.totalfreedommod.player.PlayerData;
|
||||
import me.totalfreedom.totalfreedommod.admin.Admin;
|
||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||||
|
||||
@ -66,7 +66,7 @@ public class SQLite extends FreedomService
|
||||
try
|
||||
{
|
||||
DatabaseMetaData meta = connection.getMetaData();
|
||||
if (!tableExists(meta, "bans"))
|
||||
if (tableExists(meta, "bans"))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -78,7 +78,7 @@ public class SQLite extends FreedomService
|
||||
}
|
||||
}
|
||||
|
||||
if (!tableExists(meta, "admins"))
|
||||
if (tableExists(meta, "admins"))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -89,7 +89,7 @@ public class SQLite extends FreedomService
|
||||
FLog.severe("Failed to create the admins table: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
if (!tableExists(meta, "players"))
|
||||
if (tableExists(meta, "players"))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -423,6 +423,6 @@ public class SQLite extends FreedomService
|
||||
|
||||
public boolean tableExists(DatabaseMetaData meta, String name) throws SQLException
|
||||
{
|
||||
return meta.getTables(null, null, name, null).next();
|
||||
return !meta.getTables(null, null, name, null).next();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user