diff --git a/Plugins/Mineplex.Core/src/mineplex/core/inventory/InventoryManager.java b/Plugins/Mineplex.Core/src/mineplex/core/inventory/InventoryManager.java index 6df32e218..7995a6c43 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/inventory/InventoryManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/inventory/InventoryManager.java @@ -136,17 +136,17 @@ public class InventoryManager extends MiniDbClientPlugin public Item getItem(String itemName) { - Item item = null; - for (Map.Entry entry : _items.entrySet()) { String name = entry.getKey(); if (name.equalsIgnoreCase(itemName)) - item = entry.getValue(); + { + return entry.getValue(); + } } - return item; + return null; } public void addItemToInventoryForOffline(final Callback callback, final UUID uuid, final String item, final int count)