Fix [#12]
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>AuxProtect</groupId>
|
||||
<artifactId>AuxProtect</artifactId>
|
||||
<version>1.2.5.2-pre2</version>
|
||||
<version>1.2.5.2-pre3</version>
|
||||
<name>AuxProtect</name>
|
||||
<build>
|
||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -430,4 +430,11 @@ public class ConnectionPool {
|
||||
}
|
||||
}
|
||||
|
||||
public String concat(String s1, String s2) {
|
||||
if (isMySQL()) {
|
||||
return "CONCAT(" + s1 + "," + s2 + ")";
|
||||
} else {
|
||||
return s1 + "||" + s2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user