From 82873eaa71c7b29fdd18ed0169866cf3d6b08d0b Mon Sep 17 00:00:00 2001 From: Starky Date: Thu, 26 May 2022 01:33:00 -0400 Subject: [PATCH] Corrected index of statement placeholders --- .../game/core/velocity/events/CoreEventListener.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/grubnest/game/core/velocity/events/CoreEventListener.java b/src/main/java/com/grubnest/game/core/velocity/events/CoreEventListener.java index 87ef15a..a8ab741 100644 --- a/src/main/java/com/grubnest/game/core/velocity/events/CoreEventListener.java +++ b/src/main/java/com/grubnest/game/core/velocity/events/CoreEventListener.java @@ -26,8 +26,6 @@ public class CoreEventListener { */ @Subscribe public void onServerConnect(ServerConnectedEvent event) { - VelocityPlugin.getInstance().getServer().sendMessage(Component.text("SERVER CONNECTION EVENT FIRED FOR: " + event.getPlayer().getUsername())); - try { Connection connection = VelocityPlugin.getInstance().getMySQL().getConnection(); PreparedStatement statement = connection.prepareStatement(""" @@ -38,9 +36,9 @@ public void onServerConnect(ServerConnectedEvent event) { ON DUPLICATE KEY UPDATE username = ?; """); - statement.setString(0, event.getPlayer().getUniqueId().toString()); - statement.setString(1, event.getPlayer().getUsername()); + statement.setString(1, event.getPlayer().getUniqueId().toString()); statement.setString(2, event.getPlayer().getUsername()); + statement.setString(3, event.getPlayer().getUsername()); statement.executeUpdate(); statement.close(); connection.close();