Class ClipboardFormats

java.lang.Object
com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats

public class ClipboardFormats extends Object
  • Method Details

    • registerClipboardFormat

      public static void registerClipboardFormat(ClipboardFormat format)
    • findByAlias

      @Nullable public static ClipboardFormat findByAlias(String alias)
      Find the clipboard format named by the given alias.
      Parameters:
      alias - the alias
      Returns:
      the format, otherwise null if none is matched
    • findByFile

      @Nullable public static ClipboardFormat findByFile(File file)
      Detect the format of given a file.
      Parameters:
      file - the file
      Returns:
      the format, otherwise null if one cannot be detected
    • getFileExtensionMap

      public static com.google.common.collect.Multimap<String,ClipboardFormat> getFileExtensionMap()
      A mapping from extensions to formats.
      Returns:
      a multimap from a file extension to the potential matching formats.
    • getAll

      public static Collection<ClipboardFormat> getAll()
    • getFileExtensionArray

      public static String[] getFileExtensionArray()
      Not public API, only used by SchematicCommands. It is not in SchematicCommands because it may rely on internal register calls.
    • findByExtension

      @Nullable public static ClipboardFormat findByExtension(String extension)
      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

      public static URIClipboardHolder[] loadAllFromDirectory(File dir)
    • loadAllFromUrl

      public static MultiClipboardHolder loadAllFromUrl(URL url) throws IOException
      Throws:
      IOException