Skip to content

Commit e19cdcb

Browse files
committed
A plugin is required to build inventories.
Signed-off-by: Chris Sanders <[email protected]>
1 parent 701642b commit e19cdcb

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import org.spongepowered.api.item.inventory.query.QueryTypes;
3838
import org.spongepowered.api.item.inventory.transaction.InventoryTransactionResult;
3939
import org.spongepowered.api.item.inventory.type.ViewableInventory;
40+
import org.spongepowered.plugin.PluginContainer;
4041

4142
import java.util.List;
4243
import java.util.Optional;
@@ -511,6 +512,13 @@ interface BuildingStep extends Builder {
511512
*/
512513
interface EndStep {
513514

515+
/**
516+
* Sets the {@link PluginContainer plugin}.
517+
* @param plugin The plugin
518+
* @return this step
519+
*/
520+
EndStep plugin(PluginContainer plugin);
521+
514522
/**
515523
* Sets a unique identifier. Can be retrieved later using. {@link Inventory#get(Key)} with {@link Keys#UNIQUE_ID}
516524
*

src/main/java/org/spongepowered/api/item/inventory/type/ViewableInventory.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.spongepowered.api.item.inventory.Slot;
3636
import org.spongepowered.api.item.inventory.menu.InventoryMenu;
3737
import org.spongepowered.math.vector.Vector2i;
38+
import org.spongepowered.plugin.PluginContainer;
3839

3940
import java.util.List;
4041
import java.util.Set;
@@ -250,6 +251,13 @@ interface DummyStep extends BuildingStep {
250251

251252
interface EndStep extends Builder {
252253

254+
/**
255+
* Sets the {@link PluginContainer plugin}.
256+
* @param plugin The plugin
257+
* @return this step
258+
*/
259+
EndStep plugin(PluginContainer plugin);
260+
253261
/**
254262
* Sets a unique identifier. Can be retrieved later using. {@link Inventory#get(Key)} with {@link Keys#UNIQUE_ID}
255263
*

0 commit comments

Comments
 (0)