From d5c01c480fb7d3b3d66abef3a1bf36f641698f26 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Thu, 5 Jun 2014 12:22:46 +0200 Subject: Simplify item taking --- src/esieequest/game/items/Inventory.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/esieequest/game/items/Inventory.java b/src/esieequest/game/items/Inventory.java index 6bbda23..04f5a0b 100644 --- a/src/esieequest/game/items/Inventory.java +++ b/src/esieequest/game/items/Inventory.java @@ -150,9 +150,7 @@ public class Inventory implements SerialisableList { * @return the Item */ public Item takeItem(final String itemName) { - final Item item = this.getItem(itemName); - this.removeItem(item); - return item; + return this.items.remove(itemName); } /** -- cgit v1.2.3