MySQL help

Discussion in 'Plugin Development' started by __Sour, May 9, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    __Sour

    I was wanting make a account system from my website, and only let players make accounts in-game. I have a command '/registier <email> <password>' I'm trying to see if when a players types the command , if the <table> already contains their uuid. But I'm having trouble with the syntax. any help? Maybe some dummy code? I'm new to mysql

    EDIT:
    Code:
    public void addAccount(Player player, String uuid, String email, String password) {
            try {
                PreparedStatement statement = connection.prepareStatement("select from users where uuid='" + uuid + "'");
                ResultSet result = statement.executeQuery();
                if (result.next()) {
                    player.sendMessage("An account with your uuid already exists.");
                } else {
                    PreparedStatement create = connection.prepareStatement("insert into users (uuid, username, password) values (" + uuid + ", " + email + ", " + password + ")");
                    create.executeQuery();
                    player.sendMessage("Your account has been linked to the website!");
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    I have got this so far would this work?
     
    Last edited: May 9, 2015
  2. Offline

    Epicballzy

    "select from users"
    Add a * between select and from. This will select ALL the users with the specified uuid.
    Also, make sure you use a safe way for storing their passwords. Don't just save it as is, because it's very unsafe and it makes it MUCH easier for hackers to get into users accounts.

    Look for tutorials on password hashing and salting.
     
  3. Offline

    __Sour

    @Epicballzy Okay, ill try that now, give me a minute.

    My Code:
    Code:
    public void addAccount(Player player, String uuid, String email, String password) {
            try {
                PreparedStatement statement = connection.prepareStatement("select * from users where uuid='" + uuid + "'");
                ResultSet result = statement.executeQuery();
                if (result.next()) {
                    player.sendMessage("An account with your uuid already exists.");
                } else {
                    PreparedStatement create = connection.prepareStatement("insert into users (uuid, username, password) values (" + uuid + ", " + email + ", " + password + ")");
                    create.executeQuery();
                    player.sendMessage("Your account has been linked to the website!");
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    EDIT: I got a error
    Code:
    [10:39:59 INFO]: [WorldEdit] Enabling WorldEdit v6.0;3342-78f975b9
    [10:40:00 INFO]: WEPIF: Using the Bukkit Permissions API.
    [10:40:00 INFO]: [WorldEdit] Using com.sk89q.worldedit.bukkit.adapter.impl.Spigo
    t_v1_8_R1 as the Bukkit adapter
    [10:40:00 INFO]: Server permissions file permissions.yml is empty, ignoring it
    [10:40:00 INFO]: CONSOLE: Reload complete.
    [10:40:05 INFO]: HellBoyFan100 issued server command: /registier [email protected]
    otmail.com Wowhead2014
    [10:40:05 WARN]: java.sql.SQLException: Access denied for user 'srmc'@'99-9-134-
    220.lightspeed.dllstx.sbcglobal.net' (using password: YES)
    [10:40:05 WARN]:        at com.mysql.jdbc.SQLError.createSQLException(SQLError.j
    ava:1073)
    [10:40:05 WARN]:        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
    3593)
    [10:40:05 WARN]:        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
    3525)
    [10:40:05 WARN]:        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
    931)
    [10:40:05 WARN]:        at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:403
    1)
    [10:40:05 WARN]:        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1296)
    
    [10:40:05 WARN]:        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionI
    mpl.java:2338)
    [10:40:05 WARN]:        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(Conne
    ctionImpl.java:2371)
    [10:40:05 WARN]:        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionI
    mpl.java:2163)
    [10:40:05 WARN]:        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.j
    ava:794)
    [10:40:05 WARN]:        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection
    .java:47)
    [10:40:05 WARN]:        at sun.reflect.NativeConstructorAccessorImpl.newInstance
    0(Native Method)
    [10:40:05 WARN]:        at sun.reflect.NativeConstructorAccessorImpl.newInstance
    (Unknown Source)
    [10:40:05 WARN]:        at sun.reflect.DelegatingConstructorAccessorImpl.newInst
    ance(Unknown Source)
    [10:40:05 WARN]:        at java.lang.reflect.Constructor.newInstance(Unknown Sou
    rce)
    [10:40:05 WARN]:        at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    [10:40:05 WARN]:        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionI
    mpl.java:378)
    [10:40:05 WARN]:        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegist
    eringDriver.java:305)
    [10:40:05 WARN]:        at java.sql.DriverManager.getConnection(Unknown Source)
    [10:40:05 WARN]:        at java.sql.DriverManager.getConnection(Unknown Source)
    [10:40:05 WARN]:        at srmc.core.mysql.MySQL.<init>(MySQL.java:16)
    [10:40:05 WARN]:        at srmc.core.commands.user.Registier.onCommand(Registier
    .java:23)
    [10:40:05 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginComman
    d.java:44)
    [10:40:05 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCo
    mmandMap.java:141)
    [10:40:05 WARN]:        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCo
    mmand(CraftServer.java:645)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.PlayerConnection.handleC
    ommand(PlayerConnection.java:1115)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.PlayerConnection.a(Playe
    rConnection.java:950)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(Packe
    tPlayInChat.java:26)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(Packe
    tPlayInChat.java:53)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.PacketHandleTask.run(Sou
    rceFile:13)
    [10:40:05 WARN]:        at java.util.concurrent.Executors$RunnableAdapter.call(U
    nknown Source)
    [10:40:05 WARN]:        at java.util.concurrent.FutureTask.run(Unknown Source)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.MinecraftServer.z(Minecr
    aftServer.java:683)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.DedicatedServer.z(Dedica
    tedServer.java:316)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.MinecraftServer.y(Minecr
    aftServer.java:623)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.MinecraftServer.run(Mine
    craftServer.java:526)
    [10:40:05 WARN]:        at java.lang.Thread.run(Unknown Source)
    [10:40:05 WARN]: java.lang.NullPointerException
    [10:40:05 WARN]:        at srmc.core.mysql.MySQL.addAccount(MySQL.java:24)
    [10:40:05 WARN]:        at srmc.core.commands.user.Registier.onCommand(Registier
    .java:24)
    [10:40:05 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginComman
    d.java:44)
    [10:40:05 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCo
    mmandMap.java:141)
    [10:40:05 WARN]:        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCo
    mmand(CraftServer.java:645)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.PlayerConnection.handleC
    ommand(PlayerConnection.java:1115)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.PlayerConnection.a(Playe
    rConnection.java:950)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(Packe
    tPlayInChat.java:26)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(Packe
    tPlayInChat.java:53)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.PacketHandleTask.run(Sou
    rceFile:13)
    [10:40:05 WARN]:        at java.util.concurrent.Executors$RunnableAdapter.call(U
    nknown Source)
    [10:40:05 WARN]:        at java.util.concurrent.FutureTask.run(Unknown Source)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.MinecraftServer.z(Minecr
    aftServer.java:683)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.DedicatedServer.z(Dedica
    tedServer.java:316)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.MinecraftServer.y(Minecr
    aftServer.java:623)
    [10:40:05 WARN]:        at net.minecraft.server.v1_8_R1.MinecraftServer.run(Mine
    craftServer.java:526)
    [10:40:05 WARN]:        at java.lang.Thread.run(Unknown Source)
    >reload
    [10:42:38 INFO]: Debug logging is disabled
    [10:42:38 INFO]: Server Ping Player Sample Count: 12
    [10:42:38 INFO]: Using 4 threads for Netty based IO
    [10:42:38 INFO]: -------- World Settings For [world] --------
    [10:42:38 INFO]: Arrow Despawn Rate: 1200
    [10:42:38 INFO]: Max TNT Explosions: 100
    [10:42:38 INFO]: Sending up to 10 chunks per packet
    [10:42:38 INFO]: Nerfing mobs spawned from spawners: false
    [10:42:38 INFO]: Mob Spawn Range: 4
    [10:42:38 INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    
    [10:42:38 INFO]: Cactus Growth Modifier: 100%
    [10:42:38 INFO]: Cane Growth Modifier: 100%
    [10:42:38 INFO]: Melon Growth Modifier: 100%
    [10:42:38 INFO]: Mushroom Growth Modifier: 100%
    [10:42:38 INFO]: Pumpkin Growth Modifier: 100%
    [10:42:38 INFO]: Sapling Growth Modifier: 100%
    [10:42:38 INFO]: Wheat Growth Modifier: 100%
    [10:42:38 INFO]: Anti X-Ray: true
    [10:42:38 INFO]:        Engine Mode: 1
    [10:42:38 INFO]:        Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74,
    82, 129, 130]
    [10:42:38 INFO]:        Replace Blocks: [1, 5]
    [10:42:38 INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [10:42:38 INFO]: Alternative Hopper Ticking: false
    [10:42:38 INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [10:42:38 INFO]: Random Lighting Updates: false
    [10:42:38 INFO]: Structure Info Saving: true
    [10:42:38 INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [10:42:38 INFO]: Item Merge Radius: 2.5
    [10:42:38 INFO]: Item Despawn Rate: 6000
    [10:42:38 INFO]: Experience Merge Radius: 3.0
    [10:42:38 INFO]: Chunks to Grow per Tick: 650
    [10:42:38 INFO]: Clear tick list: false
    [10:42:38 INFO]: View Distance: 10
    [10:42:38 INFO]: Zombie Aggressive Towards Villager: true
    [10:42:38 INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [10:42:38 INFO]: Max Entity Collisions: 8
    [10:42:38 INFO]: -------- World Settings For [world_the_end] --------
    [10:42:38 INFO]: Arrow Despawn Rate: 1200
    [10:42:38 INFO]: Max TNT Explosions: 100
    [10:42:38 INFO]: Sending up to 10 chunks per packet
    [10:42:38 INFO]: Nerfing mobs spawned from spawners: false
    [10:42:38 INFO]: Mob Spawn Range: 4
    [10:42:38 INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    
    [10:42:38 INFO]: Cactus Growth Modifier: 100%
    [10:42:38 INFO]: Cane Growth Modifier: 100%
    [10:42:38 INFO]: Melon Growth Modifier: 100%
    [10:42:38 INFO]: Mushroom Growth Modifier: 100%
    [10:42:38 INFO]: Pumpkin Growth Modifier: 100%
    [10:42:38 INFO]: Sapling Growth Modifier: 100%
    [10:42:38 INFO]: Wheat Growth Modifier: 100%
    [10:42:38 INFO]: Anti X-Ray: true
    [10:42:38 INFO]:        Engine Mode: 1
    [10:42:38 INFO]:        Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74,
    82, 129, 130]
    [10:42:38 INFO]:        Replace Blocks: [1, 5]
    [10:42:38 INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [10:42:38 INFO]: Alternative Hopper Ticking: false
    [10:42:38 INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [10:42:38 INFO]: Random Lighting Updates: false
    [10:42:38 INFO]: Structure Info Saving: true
    [10:42:38 INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [10:42:38 INFO]: Item Merge Radius: 2.5
    [10:42:38 INFO]: Item Despawn Rate: 6000
    [10:42:38 INFO]: Experience Merge Radius: 3.0
    [10:42:38 INFO]: Chunks to Grow per Tick: 650
    [10:42:38 INFO]: Clear tick list: false
    [10:42:38 INFO]: View Distance: 10
    [10:42:38 INFO]: Zombie Aggressive Towards Villager: true
    [10:42:38 INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [10:42:38 INFO]: Max Entity Collisions: 8
    [10:42:38 INFO]: [WorldEdit] Disabling WorldEdit v6.0;3342-78f975b9
    [10:42:38 INFO]: [SRMC] Disabling SRMC v1.0
    [10:42:38 INFO]: [SRMC] Loading SRMC v1.0
    [10:42:38 INFO]: [WorldEdit] Loading WorldEdit v6.0;3342-78f975b9
    [10:42:38 INFO]: [SRMC] Enabling SRMC v1.0
    [10:42:38 INFO]: [WorldEdit] Enabling WorldEdit v6.0;3342-78f975b9
    [10:42:39 INFO]: WEPIF: Using the Bukkit Permissions API.
    [10:42:39 INFO]: [WorldEdit] Using com.sk89q.worldedit.bukkit.adapter.impl.Spigo
    t_v1_8_R1 as the Bukkit adapter
    [10:42:39 INFO]: Server permissions file permissions.yml is empty, ignoring it
    [10:42:39 INFO]: CONSOLE: Reload complete.
    [10:42:44 INFO]: HellBoyFan100 issued server command: /registier [email protected]
    otmail.com Wowhead2014
    [10:42:44 WARN]: java.sql.SQLException: Access denied for user 'srmc'@'99-9-134-
    220.lightspeed.dllstx.sbcglobal.net' (using password: YES)
    [10:42:44 WARN]:        at com.mysql.jdbc.SQLError.createSQLException(SQLError.j
    ava:1073)
    [10:42:44 WARN]:        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
    3593)
    [10:42:44 WARN]:        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
    3525)
    [10:42:44 WARN]:        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
    931)
    [10:42:44 WARN]:        at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:403
    1)
    [10:42:44 WARN]:        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1296)
    
    [10:42:44 WARN]:        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionI
    mpl.java:2338)
    [10:42:44 WARN]:        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(Conne
    ctionImpl.java:2371)
    [10:42:44 WARN]:        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionI
    mpl.java:2163)
    [10:42:44 WARN]:        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.j
    ava:794)
    [10:42:44 WARN]:        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection
    .java:47)
    [10:42:44 WARN]:        at sun.reflect.NativeConstructorAccessorImpl.newInstance
    0(Native Method)
    [10:42:44 WARN]:        at sun.reflect.NativeConstructorAccessorImpl.newInstance
    (Unknown Source)
    [10:42:44 WARN]:        at sun.reflect.DelegatingConstructorAccessorImpl.newInst
    ance(Unknown Source)
    [10:42:44 WARN]:        at java.lang.reflect.Constructor.newInstance(Unknown Sou
    rce)
    [10:42:44 WARN]:        at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    [10:42:44 WARN]:        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionI
    mpl.java:378)
    [10:42:44 WARN]:        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegist
    eringDriver.java:305)
    [10:42:44 WARN]:        at java.sql.DriverManager.getConnection(Unknown Source)
    [10:42:44 WARN]:        at java.sql.DriverManager.getConnection(Unknown Source)
    [10:42:44 WARN]:        at srmc.core.mysql.MySQL.<init>(MySQL.java:16)
    [10:42:44 WARN]:        at srmc.core.commands.user.Registier.onCommand(Registier
    .java:23)
    [10:42:44 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginComman
    d.java:44)
    [10:42:44 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCo
    mmandMap.java:141)
    [10:42:44 WARN]:        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCo
    mmand(CraftServer.java:645)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.PlayerConnection.handleC
    ommand(PlayerConnection.java:1115)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.PlayerConnection.a(Playe
    rConnection.java:950)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(Packe
    tPlayInChat.java:26)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(Packe
    tPlayInChat.java:53)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.PacketHandleTask.run(Sou
    rceFile:13)
    [10:42:44 WARN]:        at java.util.concurrent.Executors$RunnableAdapter.call(U
    nknown Source)
    [10:42:44 WARN]:        at java.util.concurrent.FutureTask.run(Unknown Source)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.MinecraftServer.z(Minecr
    aftServer.java:683)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.DedicatedServer.z(Dedica
    tedServer.java:316)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.MinecraftServer.y(Minecr
    aftServer.java:623)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.MinecraftServer.run(Mine
    craftServer.java:526)
    [10:42:44 WARN]:        at java.lang.Thread.run(Unknown Source)
    [10:42:44 WARN]: java.lang.NullPointerException
    [10:42:44 WARN]:        at srmc.core.mysql.MySQL.addAccount(MySQL.java:24)
    [10:42:44 WARN]:        at srmc.core.commands.user.Registier.onCommand(Registier
    .java:24)
    [10:42:44 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginComman
    d.java:44)
    [10:42:44 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCo
    mmandMap.java:141)
    [10:42:44 WARN]:        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCo
    mmand(CraftServer.java:645)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.PlayerConnection.handleC
    ommand(PlayerConnection.java:1115)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.PlayerConnection.a(Playe
    rConnection.java:950)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(Packe
    tPlayInChat.java:26)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(Packe
    tPlayInChat.java:53)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.PacketHandleTask.run(Sou
    rceFile:13)
    [10:42:44 WARN]:        at java.util.concurrent.Executors$RunnableAdapter.call(U
    nknown Source)
    [10:42:44 WARN]:        at java.util.concurrent.FutureTask.run(Unknown Source)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.MinecraftServer.z(Minecr
    aftServer.java:683)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.DedicatedServer.z(Dedica
    tedServer.java:316)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.MinecraftServer.y(Minecr
    aftServer.java:623)
    [10:42:44 WARN]:        at net.minecraft.server.v1_8_R1.MinecraftServer.run(Mine
    craftServer.java:526)
    [10:42:44 WARN]:        at java.lang.Thread.run(Unknown Source)
    >
     
  4. Offline

    Epicballzy

    "Access denied for user" Seems like you're using the wrong details for the database, or you don't have proper privileges. (From my knowledge and experience)
     
  5. Offline

    __Sour

    @Epicballzy hmmm thats weird because the user has all permissions for mysql, and I changed the password and checked to see and it still didn't work.
     
  6. Offline

    RainoBoy97

    The * in SELECT * FROM users ... means "select all columns ...", not all the rows.
     
    mythbusterma and Konato_K like this.
  7. Offline

    timsavage

    I can't help you with your database connection problem, but here's the correct way to use prepared statements:
    Code:
    public void addAccount(Player player, String uuid, String email, String password) {
    
            final String sqlSelectStatement = "SELECT * FROM users WHERE uuid = ?";
            final String sqlInsertStatement = "INSERT INTO users (uuid, username, password) VALUES (?,?,?)";
    
            try {
                PreparedStatement statement = connection.prepareStatement(sqlSelectStatement);
    
                statement.setString(1, uuid);
    
                ResultSet result = statement.executeQuery();
    
                if (result.next()) {
                    player.sendMessage("An account with your uuid already exists.");
                }
                else {
                    PreparedStatement create = connection.prepareStatement(sqlInsertStatement);
    
                    create.setString(1, uuid);
                    create.setString(2, email);
                    create.setString(3, password);
    
                    create.executeUpdate();
    
                    player.sendMessage("Your account has been linked to the website!");
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    
     
  8. Offline

    1Rogue

    You should never use "SELECT *" in production code like that
     
Thread Status:
Not open for further replies.

Share This Page