diff --git a/src/main/java/com/alpsbte/plotsystem/core/EventListener.java b/src/main/java/com/alpsbte/plotsystem/core/EventListener.java index 7342e7ba..70ba7420 100644 --- a/src/main/java/com/alpsbte/plotsystem/core/EventListener.java +++ b/src/main/java/com/alpsbte/plotsystem/core/EventListener.java @@ -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; @@ -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);