mirror of
https://github.com/Artillex-Studios/AxMinions.git
synced 2024-11-28 12:35:38 +01:00
Finally fix
This commit is contained in:
parent
6b312bb35f
commit
913efc7fde
@ -376,8 +376,10 @@ class H2DataHandler : DataHandler {
|
|||||||
|
|
||||||
override fun islandPlace(island: String) {
|
override fun islandPlace(island: String) {
|
||||||
dataSource.connection.use { connection ->
|
dataSource.connection.use { connection ->
|
||||||
connection.prepareStatement("UPDATE `axminions_island_counter` SET `placed` = `placed` + 1 WHERE `island` = ?;").use { statement ->
|
val placed = getIsland(island) + 1
|
||||||
statement.setString(1, island)
|
connection.prepareStatement("MERGE INTO `axminions_island_counter`(`placed`, `island`) KEY(`island`) VALUES(?,?);").use { statement ->
|
||||||
|
statement.setInt(1, placed)
|
||||||
|
statement.setString(2, island)
|
||||||
statement.executeUpdate()
|
statement.executeUpdate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user