-
Notifications
You must be signed in to change notification settings - Fork 225
Clipboard API
Jesse Boyd edited this page Feb 23, 2017
·
3 revisions
With FAWE installed, you can register a new ClipboardFormat through the API
// (name of format, aliases...)
ClipboardFormat.addFormat(new AbstractClipboardFormat("CUSTOM", "custom") {
@Override
public ClipboardReader getReader(InputStream inputStream) throws IOException {
return new yourCustomClipboardReader();
}
@Override
public ClipboardWriter getWriter(OutputStream outputStream) throws IOException {
return new yourCustomClipboardWriter();
}
@Override
public boolean isFormat(File file) {
// Return true if this file is using the format (usually just check the extension)
return file.getName().endsWith(".custom");
}
@Override
public String getExtension() {
return "custom";
}
});
The format will then be usable ingame: //schem load <format> <file>
This wiki is outdated, move to https://github.com/IntellectualSites/FastAsyncWorldEdit-Documentation/
This Wiki is for Legacy Versions (1.8 - 1.12.2). Check here for 1.13+ versions: https://github.com/IntellectualSites/FastAsyncWorldEdit-Documentation/