mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
Fix SQL Syntax
This commit is contained in:
parent
8b94ef3789
commit
8ecc1d2fce
@ -31,7 +31,7 @@ public class AdventureCMD extends PlexCommand
|
|||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
// doesn't work
|
// doesn't work
|
||||||
if (isConsole())
|
if (sender.isConsoleSender())
|
||||||
{
|
{
|
||||||
throw new CommandFailException("You must define a player when using the console!");
|
throw new CommandFailException("You must define a player when using the console!");
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ public class CreativeCMD extends PlexCommand
|
|||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
// doesn't work
|
// doesn't work
|
||||||
if (isConsole())
|
if (sender.isConsoleSender())
|
||||||
{
|
{
|
||||||
throw new CommandFailException("You must define a player when using the console!");
|
throw new CommandFailException("You must define a player when using the console!");
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ public class SpectatorCMD extends PlexCommand
|
|||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
// doesn't work
|
// doesn't work
|
||||||
if (isConsole())
|
if (sender.isConsoleSender())
|
||||||
{
|
{
|
||||||
throw new CommandFailException("You must define a player when using the console!");
|
throw new CommandFailException("You must define a player when using the console!");
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ public class SurvivalCMD extends PlexCommand
|
|||||||
if (args.length == 0)
|
if (args.length == 0)
|
||||||
{
|
{
|
||||||
// doesn't work
|
// doesn't work
|
||||||
if (isConsole())
|
if (sender.isConsoleSender())
|
||||||
{
|
{
|
||||||
throw new CommandFailException("You must define a player when using the console!");
|
throw new CommandFailException("You must define a player when using the console!");
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,6 @@ public class PunishedPlayer
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
PlexLog.log("Created new punishment file for " + getUuid() + " (" + DataUtils.getPlayer(getUuid()).getName() + ")");
|
|
||||||
}
|
}
|
||||||
return file;
|
return file;
|
||||||
|
|
||||||
|
@ -41,26 +41,25 @@ public class SQLConnection extends PlexBase
|
|||||||
{
|
{
|
||||||
if (connection != null)
|
if (connection != null)
|
||||||
{
|
{
|
||||||
connection.prepareStatement("CREATE TABLE IF NOT EXISTS `players` (\n" +
|
connection.prepareStatement("CREATE TABLE IF NOT EXISTS `players` (" +
|
||||||
"\t`uuid` VARCHAR(46) NOT NULL,\n" +
|
"`uuid` VARCHAR(46) NOT NULL, " +
|
||||||
"\t`name` VARCHAR(18),\n" +
|
"`name` VARCHAR(18), " +
|
||||||
"\t`login_msg` VARCHAR,\n" +
|
"`login_msg` VARCHAR(70), " +
|
||||||
"\t`prefix` VARCHAR,\n" +
|
"`prefix` VARCHAR(45), " +
|
||||||
"\t`rank` VARCHAR,\n" +
|
"`rank` VARCHAR(20), " +
|
||||||
"\t`ips` VARCHAR,\n" +
|
"`ips` VARCHAR(2000), " +
|
||||||
"\t`coins` BIGINT,\n" +
|
"`coins` BIGINT, " +
|
||||||
"\t`vanished` BOOLEAN,\n" +
|
"`vanished` BOOLEAN, " +
|
||||||
"\tPRIMARY KEY (`uuid`)\n" +
|
"PRIMARY KEY (`uuid`));").execute();
|
||||||
");").execute();
|
connection.prepareStatement("CREATE TABLE IF NOT EXISTS `bans` (" +
|
||||||
connection.prepareStatement("CREATE TABLE IF NOT EXISTS `bans` (\n" +
|
"`banID` VARCHAR(46)," +
|
||||||
"\t`banID` VARCHAR,\n" +
|
" `uuid` VARCHAR(46) NOT NULL," +
|
||||||
"\t`uuid` VARCHAR(46) NOT NULL,\n" +
|
" `banner` VARCHAR(46)," +
|
||||||
"\t`banner` VARCHAR(46),\n" +
|
"`ip` VARCHAR(2000)," +
|
||||||
"\t`ip` VARCHAR,\n" +
|
" `reason` VARCHAR(256)," +
|
||||||
"\t`reason` VARCHAR,\n" +
|
" `enddate` BIGINT," +
|
||||||
"\t`enddate` BIGINT,\n" +
|
" `active` BOOLEAN," +
|
||||||
"\t`active` BOOLEAN,\n" +
|
" PRIMARY KEY (`banID`)" +
|
||||||
"\tPRIMARY KEY (`banID`)\n" +
|
|
||||||
");").execute();
|
");").execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user