Package com.marcusslover.plus.lib.item
Interface Canvas.ItemDecorator
- All Known Implementing Classes:
Canvas.AvoidEdgesDecorator,Canvas.EdgeDecorator,Canvas.FullDecorator
- Enclosing class:
Canvas
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a decorator that puts "free" items in the inventory.
Free items can be interpreted as items that are not associated with any button.
This is useful, for example, to put a border around the inventory -
We do not want to create objects for each item in the border.
Instead, we can use this light-weight decorator.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(@NotNull Canvas.ItemDecorator.ItemDecoratorContext ctx) Decorates the inventory.
-
Method Details
-
handle
Decorates the inventory.- Parameters:
ctx- the context of the decoration
-