diff --git a/src/main/java/cactusServer/entities/Character.java b/src/main/java/cactusServer/entities/Character.java index 06f8c09..7a3a7e7 100644 --- a/src/main/java/cactusServer/entities/Character.java +++ b/src/main/java/cactusServer/entities/Character.java @@ -77,11 +77,7 @@ @JSONHint(ignore = true) public List getItems() { - List itemList = new ArrayList<>(); - for (Item item : itemMap.values()) { - itemList.add(item); - } - return itemList; + return new ArrayList(itemMap.values()); } public void setAccountURI(String accountURI) { @@ -120,8 +116,8 @@ } public boolean hasItem(Item item) { - for (Map.Entry entry : itemMap.entrySet()) { - if (entry.getValue().equals(item)) { + for (Item value : itemMap.values()) { + if (value.equals(item)) { return true; } }