Skip to content

Commit 96e3b65

Browse files
committed
wrap null ContainerType
1 parent d079755 commit 96e3b65

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/spongepowered/api/item/inventory/Container.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,11 @@ public interface Container extends Inventory {
9393

9494
/**
9595
* Returns the {@link ContainerType} of this container.
96+
* <p>Notably the players own inventory does not have a ContainerType</p>
9697
*
9798
* @return the ContainerType of this container.
9899
*/
99-
ContainerType type();
100+
Optional<ContainerType> type();
100101

101102
/**
102103
* Returns the {@link InventoryMenu} if this container has been opened by one.

0 commit comments

Comments
 (0)