Package com.sk89q.worldedit.session
Class ClipboardHolder
java.lang.Object
com.sk89q.worldedit.session.ClipboardHolder
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
URIClipboardHolder
Holds the clipboard and the current transform on the clipboard.
-
Constructor Summary
ConstructorDescriptionClipboardHolder
(Clipboard clipboard) Create a new instance with the given clipboard. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
createPaste
(Extent targetExtent) Create a builder for an operation to paste this clipboard.void
flush()
Deprecated.Gets all currently held clipboards.Gets all end ClipboardHolders
- Usually this will return itself.
- If this is a multi clipboard, it will return the childrenGet the transform.void
setTransform
(Transform transform) Set the transform.
-
Constructor Details
-
ClipboardHolder
Create a new instance with the given clipboard.- Parameters:
clipboard
- the clipboard
-
-
Method Details
-
getClipboard
Deprecated.FAWE supports multiple loaded schematicsgetClipboards()
Get the clipboard.If there is a transformation applied, the returned clipboard will not contain its effect.
- Returns:
- the clipboard
-
getClipboards
Gets all currently held clipboards.- Returns:
- all clipboards being held.
-
contains
-
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
Set the transform.- Parameters:
transform
- the transform
-
getTransform
Get the transform.- Returns:
- the transform
-
createPaste
Create a builder for an operation to paste this clipboard.- Returns:
- a builder
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
flush
- Specified by:
flush
in interfaceFlushable
- Throws:
IOException
-
getClipboards()