diff --git a/src/main/java/net/minestom/server/inventory/TransactionOption.java b/src/main/java/net/minestom/server/inventory/TransactionOption.java index 313f9a3ed..0fa871d87 100644 --- a/src/main/java/net/minestom/server/inventory/TransactionOption.java +++ b/src/main/java/net/minestom/server/inventory/TransactionOption.java @@ -13,7 +13,7 @@ public interface TransactionOption { *

* The remaining, can be air. */ - TransactionOption<@NotNull ItemStack> ALL = (inventory, result, itemChangesMap) -> { + TransactionOption ALL = (inventory, result, itemChangesMap) -> { itemChangesMap.forEach(inventory::safeItemInsert); return result; }; @@ -23,7 +23,7 @@ public interface TransactionOption { *

* Returns true if the item has been added, false if nothing changed. */ - TransactionOption<@NotNull Boolean> ALL_OR_NOTHING = (inventory, result, itemChangesMap) -> { + TransactionOption ALL_OR_NOTHING = (inventory, result, itemChangesMap) -> { if (result.isAir()) { // Item can be fully placed inside the inventory, do so itemChangesMap.forEach(inventory::safeItemInsert); @@ -39,7 +39,7 @@ public interface TransactionOption { *

* Returns true if the item can be fully added, false otherwise. */ - TransactionOption<@NotNull Boolean> DRY_RUN = (inventory, result, itemChangesMap) -> result.isAir(); + TransactionOption DRY_RUN = (inventory, result, itemChangesMap) -> result.isAir(); @NotNull T fill(@NotNull AbstractInventory inventory, @NotNull ItemStack result, diff --git a/src/main/java/net/minestom/server/inventory/TransactionType.java b/src/main/java/net/minestom/server/inventory/TransactionType.java index 80f2fe97d..fa0bafc67 100644 --- a/src/main/java/net/minestom/server/inventory/TransactionType.java +++ b/src/main/java/net/minestom/server/inventory/TransactionType.java @@ -12,6 +12,7 @@ import java.util.Map; /** * Represents a type of transaction that you can apply to an {@link AbstractInventory}. */ +@FunctionalInterface public interface TransactionType { /**