openWorkbench

public abstract InventoryView openWorkbench(Location location, boolean force)

Opens an empty workbench inventory window with the player's inventory on the bottom.

Return

The newly opened inventory view, or null if it could not be opened.

Parameters

location

The location to attach it to. If null, the player's location is used.

force

If false, and there is no workbench block at the location, no inventory will be opened and null will be returned.