mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
fix removing item by name
This commit is contained in:
@@ -1194,9 +1194,7 @@ public class AdventurePlayer implements Serializable, SaveFileContent {
|
||||
}
|
||||
|
||||
public void removeItem(String name) {
|
||||
ItemData item = ItemListData.getItem(name);
|
||||
if (item != null)
|
||||
removeItem(item);
|
||||
inventoryItems.stream().filter(itemData -> name.equalsIgnoreCase(itemData.name)).findFirst().ifPresent(this::removeItem);
|
||||
}
|
||||
|
||||
public void removeItem(ItemData item) {
|
||||
|
||||
Reference in New Issue
Block a user