Add support for url:key in fullcopy

This commit is contained in:
Jesse Boyd 2018-08-09 23:58:26 +10:00
parent 60d07b5c2f
commit c12f685f0f
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -307,6 +307,10 @@ public enum ClipboardFormat {
checkNotNull(input); checkNotNull(input);
WorldEdit worldEdit = WorldEdit.getInstance(); WorldEdit worldEdit = WorldEdit.getInstance();
LocalConfiguration config = worldEdit.getConfiguration(); LocalConfiguration config = worldEdit.getConfiguration();
if (input.startsWith("url:")) {
URL base = new URL(Settings.IMP.WEB.URL);
input = new URL(base, "uploads/" + input.substring(4) + ".schematic").toString();
}
if (input.startsWith("http")) { if (input.startsWith("http")) {
URL url = new URL(input); URL url = new URL(input);
URL webInterface = new URL(Settings.IMP.WEB.ASSETS); URL webInterface = new URL(Settings.IMP.WEB.ASSETS);