I have a command that kicks a player from a MySQL database, but it's not working when the player is offline; it won't delete them from the database.
Here's my code:
this.ms.connect();
PreparedStatement kick = this.ms.prepare("DELETE FROM `players` WHERE `nick` = ?");
try {
kick.setString(1, args[0]);
} catch (SQLException e) {
e.printStackTrace();
}
this.ms.execute(kick);
The error I get is:
Caused by: java.lang.IllegalArgumentException: OfflinePlayer cannot be null