Interface MPPViewports

All Superinterfaces:
Iterable<MPPViewport>

@ForUseOnly public interface MPPViewports extends Iterable<MPPViewport>
This interface represents a container for viewports. It is used to enable modifying the current viewports or to add/remove viewports to the multi perspective preview (MPP).

The iterators returned by this class's iterator are fail-fast: if the collection is structurally modified at any time after the iterator is created, in any way except through the iterator's own remove method, the iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.

Since:
5.2.604
  • Method Details

    • builder

      @NotNull MPPViewport.Builder builder()
      Provides a new builder instance to create a viewport.
      Returns:
      a new builder instance to create a viewport
      Since:
      5.2.604
      See Also:
    • add

      void add(@NotNull @NotNull MPPViewport viewport)
      Adds the given viewport to the current collection of viewports.
      Parameters:
      viewport - the viewport to add
      Since:
      5.2.604
      See Also:
    • remove

      boolean remove(@NotNull @NotNull MPPViewport viewport)
      Removes the given viewport from the current collection.
      Parameters:
      viewport - the viewport to remove
      Returns:
      true if the viewport was removed in the result of this call, otherwise false
      Since:
      5.2.604
      See Also: