From 81f2127a9dc801ab7ba522ed98027cf6633a3e7c Mon Sep 17 00:00:00 2001 From: themode Date: Sun, 4 Apr 2021 21:48:11 +0200 Subject: [PATCH] Annotation style --- .../server/inventory/AbstractInventory.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/minestom/server/inventory/AbstractInventory.java b/src/main/java/net/minestom/server/inventory/AbstractInventory.java index 149b13a94..10d167eab 100644 --- a/src/main/java/net/minestom/server/inventory/AbstractInventory.java +++ b/src/main/java/net/minestom/server/inventory/AbstractInventory.java @@ -114,7 +114,7 @@ public abstract class AbstractInventory implements InventoryClickHandler, DataCo * @param itemStacks items to add * @return list of itemstacks that could not be successfully fully added, empty list otherwise */ - public List addItemStacks(@NotNull List itemStacks) { + public @NotNull List addItemStacks(@NotNull List itemStacks) { List result = new ArrayList<>(); itemStacks.forEach(itemStack -> { if (!addItemStack(itemStack)) { @@ -212,7 +212,7 @@ public abstract class AbstractInventory implements InventoryClickHandler, DataCo * @param itemStacks items to take * @return list of itemstacks that could not be successfully fully taken, empty list otherwise */ - public List takeItemStacks(@NotNull List itemStacks) { + public @NotNull List takeItemStacks(@NotNull List itemStacks) { List result = new ArrayList<>(); itemStacks.forEach(itemStack -> { if (!takeItemStack(itemStack)) { @@ -280,8 +280,7 @@ public abstract class AbstractInventory implements InventoryClickHandler, DataCo * @param slot the slot to check * @return the item in the slot {@code slot} */ - @NotNull - public ItemStack getItemStack(int slot) { + public @NotNull ItemStack getItemStack(int slot) { return itemStacks[slot]; } @@ -293,8 +292,7 @@ public abstract class AbstractInventory implements InventoryClickHandler, DataCo * * @return an array containing all the inventory's items */ - @NotNull - public ItemStack[] getItemStacks() { + public @NotNull ItemStack[] getItemStacks() { return itemStacks.clone(); } @@ -321,8 +319,7 @@ public abstract class AbstractInventory implements InventoryClickHandler, DataCo * * @return a modifiable {@link List} containing all the inventory conditions */ - @NotNull - public List getInventoryConditions() { + public @NotNull List getInventoryConditions() { return inventoryConditions; }