Skip to content

Commit f5ea14a

Browse files
committed
Update InventoryData.java
1 parent 0cc69d0 commit f5ea14a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/dev/felnull/Data/InventoryData.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@ public InventoryData(String displayName, int rows, Set<String> requirePermission
2121
this.itemStackSlot = itemStackSlot;
2222
}
2323

24-
// タグ追加用の補助メソッド
24+
// タグ用の補助メソッド
2525
public void addUserTag(String tag) {
26+
if (tag == null) return;
2627
userTags.add(tag);
2728
}
29+
public boolean removeUserTag(String tag){
30+
if (tag == null) return false;
31+
return userTags.removeIf(s -> Objects.equals(s, tag));
32+
}
2833

2934
// タグ全取得
3035
public List<String> getUserTags() {

0 commit comments

Comments
 (0)