Skip to content

Commit 0406c61

Browse files
committed
fix: kills table prefix
closes #470
1 parent a2e59c9 commit 0406c61

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/net/sacredlabyrinth/phaed/simpleclans/managers/StorageManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ public void insertKill(Player attacker, String attackerTag, Player victim, Strin
930930
* @param type the kill type
931931
*/
932932
public void insertKill(@NotNull ClanPlayer attacker, @NotNull ClanPlayer victim, @NotNull String type, @NotNull LocalDateTime time) {
933-
String query = "INSERT INTO `sc_kills` ( `attacker_uuid`, `attacker`, `attacker_tag`, `victim_uuid`, " +
933+
String query = "INSERT INTO `" + getPrefixedTable("kills") + "` ( `attacker_uuid`, `attacker`, `attacker_tag`, `victim_uuid`, " +
934934
"`victim`, `victim_tag`, `kill_type`, `created_at`) ";
935935
String values = "VALUES ( '" + attacker.getUniqueId() + "','" + attacker.getName() + "','" + attacker.getTag()
936936
+ "','" + victim.getUniqueId() + "','" + victim.getName() + "','" + victim.getTag() + "','" + type + "','" + time + "');";
@@ -1175,7 +1175,7 @@ private void updateDatabase() {
11751175

11761176
// From 2.19.3 to 2.20.0
11771177
if (!core.existsColumn(getPrefixedTable("kills"), "created_at")) {
1178-
query = "ALTER TABLE sc_kills ADD `created_at` datetime NULL;";
1178+
query = "ALTER TABLE `" + getPrefixedTable("kills") + "` ADD `created_at` datetime NULL;";
11791179
core.execute(query);
11801180
}
11811181
}

0 commit comments

Comments
 (0)