diff --git a/pom.xml b/pom.xml
index 80a4481..610ad6e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
AuxProtect
AuxProtect
- 1.2.5.2-pre2
+ 1.2.5.2-pre3
AuxProtect
${project.artifactId}-${project.version}
diff --git a/src/main/java/dev/heliosares/auxprotect/core/commands/InvCommand.java b/src/main/java/dev/heliosares/auxprotect/core/commands/InvCommand.java
index be311d6..6de2240 100644
--- a/src/main/java/dev/heliosares/auxprotect/core/commands/InvCommand.java
+++ b/src/main/java/dev/heliosares/auxprotect/core/commands/InvCommand.java
@@ -186,7 +186,7 @@ public class InvCommand extends Command {
private static void update(IAuxProtect plugin, Player staff, long time) throws SQLException {
plugin.getSqlManager().execute(
- "UPDATE " + Table.AUXPROTECT_INVENTORY + " SET data=ifnull(data,'')||? WHERE time=? AND action_id=?",
+ "UPDATE " + Table.AUXPROTECT_INVENTORY + " SET data=" + plugin.getSqlManager().concat("ifnull(data,'')", "?") + " WHERE time=? AND action_id=?",
30000L, LocalDateTime.now().format(XrayCommand.ratedByDateFormatter) + ": Recovered by " + staff.getName() + "; ",
time, EntryAction.INVENTORY.id);
}
diff --git a/src/main/java/dev/heliosares/auxprotect/database/ConnectionPool.java b/src/main/java/dev/heliosares/auxprotect/database/ConnectionPool.java
index 3d52f0c..52e399e 100644
--- a/src/main/java/dev/heliosares/auxprotect/database/ConnectionPool.java
+++ b/src/main/java/dev/heliosares/auxprotect/database/ConnectionPool.java
@@ -430,4 +430,11 @@ public class ConnectionPool {
}
}
+ public String concat(String s1, String s2) {
+ if (isMySQL()) {
+ return "CONCAT(" + s1 + "," + s2 + ")";
+ } else {
+ return s1 + "||" + s2;
+ }
+ }
}