Class ClipboardHolder

java.lang.Object
com.sk89q.worldedit.session.ClipboardHolder
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
Direct Known Subclasses:
URIClipboardHolder

public class ClipboardHolder extends Object implements Closeable, Flushable
Holds the clipboard and the current transform on the clipboard.
  • Constructor Details

    • ClipboardHolder

      public ClipboardHolder(Clipboard clipboard)
      Create a new instance with the given clipboard.
      Parameters:
      clipboard - the clipboard
  • Method Details

    • getClipboard

      @Deprecated public Clipboard getClipboard()
      Deprecated.
      FAWE supports multiple loaded schematics getClipboards()
      Get the clipboard.

      If there is a transformation applied, the returned clipboard will not contain its effect.

      Returns:
      the clipboard
    • getClipboards

      public List<Clipboard> getClipboards()
      Gets all currently held clipboards.
      Returns:
      all clipboards being held.
    • contains

      public boolean contains(Clipboard clipboard)
    • getHolders

      public List<ClipboardHolder> getHolders()
      Gets all end ClipboardHolders
      - Usually this will return itself.
      - If this is a multi clipboard, it will return the children
      Returns:
      a List of end ClipboardHolders
    • setTransform

      public void setTransform(Transform transform)
      Set the transform.
      Parameters:
      transform - the transform
    • getTransform

      public Transform getTransform()
      Get the transform.
      Returns:
      the transform
    • createPaste

      public PasteBuilder createPaste(Extent targetExtent)
      Create a builder for an operation to paste this clipboard.
      Returns:
      a builder
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • flush

      public void flush() throws IOException
      Specified by:
      flush in interface Flushable
      Throws:
      IOException