Interface LocationInventoryViewBuilder<V extends InventoryView>

Type Parameters:
V - the type of InventoryView created from this builder
All Superinterfaces:
InventoryViewBuilder<V>

@Experimental public interface LocationInventoryViewBuilder<V extends InventoryView> extends InventoryViewBuilder<V>
An InventoryViewBuilder that can be bound by location within the world
  • Method Details

    • copy

      Description copied from interface: InventoryViewBuilder
      Makes a copy of this builder
      Specified by:
      copy in interface InventoryViewBuilder<V extends InventoryView>
      Returns:
      a copy of this builder
    • title

      @NotNull LocationInventoryViewBuilder<V> title(@NotNull String title)
      Description copied from interface: InventoryViewBuilder
      Sets the title of the builder
      Specified by:
      title in interface InventoryViewBuilder<V extends InventoryView>
      Parameters:
      title - the title
      Returns:
      this builder
    • checkReachable

      @NotNull LocationInventoryViewBuilder<V> checkReachable(boolean checkReachable)
      Determines whether or not the server should check if the player can reach the location.

      Not providing a location but setting checkReachable to true will automatically close the view when opened.

      If checkReachable is set to false and a location is set on the builder if the target block exists and this builder is the correct menu for that block, e.g. MenuType.GENERIC_9X3 builder and target block set to chest, if that block is destroyed the view would persist.

      Parameters:
      checkReachable - whether or not to check if the view is "reachable"
      Returns:
      this builder
    • location

      @NotNull LocationInventoryViewBuilder<V> location(@NotNull Location location)
      Binds a location to this builder.

      By binding a location in an unloaded chunk to this builder it is likely that the given chunk the location is will load. That means that when, building this view it may come with the costs associated with chunk loading.

      Providing a location of a tile entity with a non matching menu comes with extra costs associated with ensuring that the correct view is created.

      Parameters:
      location - the location to bind to this view
      Returns:
      this builder