Skip to content

Commit

Permalink
Fixed bug in sql statement on player join event
Browse files Browse the repository at this point in the history
  • Loading branch information
LordTuxn committed Sep 28, 2021
1 parent 50ac9ee commit 1dff721
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/java/com/alpsbte/plotsystem/core/EventListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,12 @@
import com.alpsbte.plotsystem.utils.enums.Status;
import com.sk89q.worldguard.bukkit.RegionContainer;
import com.sk89q.worldguard.bukkit.RegionQuery;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import com.sk89q.worldguard.protection.flags.DefaultFlag;
import com.sk89q.worldguard.protection.flags.StateFlag;
import me.arcaniax.hdb.api.DatabaseLoadEvent;
import me.arcaniax.hdb.api.HeadDatabaseAPI;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.BlockState;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.EntityType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
Expand Down Expand Up @@ -110,7 +107,7 @@ public void onPlayerJoinEvent(PlayerJoinEvent event) {
Builder builder = new Builder(event.getPlayer().getUniqueId());
if (!builder.getName().equals(event.getPlayer().getName())) {
DatabaseConnection.createStatement("UPDATE plotsystem_builders SET name = ? WHERE uuid = ?")
.setValue(event.getPlayer().getName()).setValue(event.getPlayer().getUniqueId()).executeUpdate();
.setValue(event.getPlayer().getName()).setValue(event.getPlayer().getUniqueId().toString()).executeUpdate();
}
} catch (SQLException ex) {
Bukkit.getLogger().log(Level.SEVERE, "A SQL error occurred!", ex);
Expand Down

0 comments on commit 1dff721

Please sign in to comment.