Class ClipboardFormats
java.lang.Object
com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClipboardFormat
findByAlias
(String alias) Find the clipboard format named by the given alias.static ClipboardFormat
findByExtension
(String extension) Detect the format using the given extension.static ClipboardFormat
findByFile
(File file) Detect the format of given a file.static Collection<ClipboardFormat>
getAll()
static String[]
Not public API, only used by SchematicCommands.static com.google.common.collect.Multimap<String,
ClipboardFormat> A mapping from extensions to formats.static URIClipboardHolder[]
loadAllFromDirectory
(File dir) static MultiClipboardHolder
loadAllFromInput
(Actor player, String input, ClipboardFormat format, boolean message) static MultiClipboardHolder
loadAllFromUrl
(URL url) static void
-
Method Details
-
registerClipboardFormat
-
findByAlias
Find the clipboard format named by the given alias.- Parameters:
alias
- the alias- Returns:
- the format, otherwise null if none is matched
-
findByFile
Detect the format of given a file.- Parameters:
file
- the file- Returns:
- the format, otherwise null if one cannot be detected
-
getFileExtensionMap
A mapping from extensions to formats.- Returns:
- a multimap from a file extension to the potential matching formats.
-
getAll
-
getFileExtensionArray
Not public API, only used by SchematicCommands. It is not in SchematicCommands because it may rely on internal register calls. -
findByExtension
Detect the format using the given extension.- Parameters:
extension
- the extension- Returns:
- the format, otherwise null if one cannot be detected
-
loadAllFromInput
public static MultiClipboardHolder loadAllFromInput(Actor player, String input, ClipboardFormat format, boolean message) throws IOException - Throws:
IOException
-
loadAllFromDirectory
-
loadAllFromUrl
- Throws:
IOException
-