From c12f685f0faf3025c867921bdf831cbaeea42479 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 9 Aug 2018 23:58:26 +1000 Subject: [PATCH] Add support for url:key in fullcopy --- .../sk89q/worldedit/extent/clipboard/io/ClipboardFormat.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardFormat.java b/core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardFormat.java index 965c6fea..b4896385 100644 --- a/core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardFormat.java +++ b/core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/ClipboardFormat.java @@ -307,6 +307,10 @@ public enum ClipboardFormat { checkNotNull(input); WorldEdit worldEdit = WorldEdit.getInstance(); 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")) { URL url = new URL(input); URL webInterface = new URL(Settings.IMP.WEB.ASSETS);