Skip to content

Commit de77443

Browse files
committed
Update DataIO.java
1 parent 24b41f1 commit de77443

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main/java/dev/felnull/DataIO/DataIO.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ public static boolean saveInventoryOnly(GroupData g, StorageData storageData, St
367367

368368
/** タグの差分同期(tag_tableを現在の集合に合わせてDELETE/INSERT)+ diff_log_tags 追記 */
369369
private static void syncTagsForPage(Connection conn, GroupData g, String pageId, InventoryData inv) throws SQLException {
370+
for(String s : inv.userTags){
371+
Bukkit.getLogger().info(s);
372+
}
370373
// 1) 入力クレンジング&重複排除(順序保持)
371374
java.util.Set<String> newTags = (inv.userTags == null) ? java.util.Collections.emptySet()
372375
: inv.userTags.stream()
@@ -449,12 +452,11 @@ public static boolean saveTagsOnly(GroupData g) {
449452
}
450453

451454
/** タグだけ特定ページ分を保存(差分同期+diff追記) */
452-
public static boolean saveTagsOnly(GroupData g, String pageId) {
455+
public static boolean saveTagsOnly(GroupData g, String pageId, InventoryData inventoryData) {
453456
if (g == null || g.storageData == null) return true;
454-
InventoryData inv = g.storageData.storageInventory.get(pageId);
455-
if (inv == null) return true;
457+
if (inventoryData == null) return true;
456458
try (Connection conn = db.getConnection()) {
457-
syncTagsForPage(conn, g, pageId, inv);
459+
syncTagsForPage(conn, g, pageId, inventoryData);
458460
return true;
459461
} catch (SQLException ex) {
460462
Bukkit.getLogger().warning("[BetterStorage] タグ保存に失敗(pageId=" + pageId + "): " + ex.getMessage());

0 commit comments

Comments
 (0)