From 33ad31454e1c1a141398c3bb2613ab519efa10fd Mon Sep 17 00:00:00 2001 From: Sauilitired Date: Thu, 10 Jan 2019 04:04:52 +0100 Subject: [PATCH 01/10] Make debugpaste use Incendo Paste Viewer, rather than Hastebin. --- .../com/boydti/fawe/util/HastebinUtility.java | 107 ------- .../com/boydti/fawe/util/IncendoPaster.java | 261 ++++++++++++++++++ .../worldedit/command/WorldEditCommands.java | 7 +- 3 files changed, 263 insertions(+), 112 deletions(-) delete mode 100644 worldedit-core/src/main/java/com/boydti/fawe/util/HastebinUtility.java create mode 100644 worldedit-core/src/main/java/com/boydti/fawe/util/IncendoPaster.java diff --git a/worldedit-core/src/main/java/com/boydti/fawe/util/HastebinUtility.java b/worldedit-core/src/main/java/com/boydti/fawe/util/HastebinUtility.java deleted file mode 100644 index c844082bb..000000000 --- a/worldedit-core/src/main/java/com/boydti/fawe/util/HastebinUtility.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.boydti.fawe.util; - -import com.boydti.fawe.Fawe; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class HastebinUtility { - - public static final String BIN_URL = "https://hastebin.com/documents", USER_AGENT = "Mozilla/5.0"; - public static final Pattern PATTERN = Pattern.compile("\\{\"key\":\"([\\S\\s]*)\"\\}"); - - public static String upload(final String string) throws IOException { - final URL url = new URL(BIN_URL); - final HttpURLConnection connection = (HttpURLConnection) url.openConnection(); - - connection.setRequestMethod("POST"); - connection.setRequestProperty("User-Agent", USER_AGENT); - connection.setDoOutput(true); - - try (DataOutputStream outputStream = new DataOutputStream(connection.getOutputStream())) { - outputStream.write(string.getBytes()); - outputStream.flush(); - } - - StringBuilder response; - try (BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()))) { - response = new StringBuilder(); - - String inputLine; - while ((inputLine = in.readLine()) != null) { - response.append(inputLine); - } - } - - Matcher matcher = PATTERN.matcher(response.toString()); - if (matcher.matches()) { - return "https://hastebin.com/" + matcher.group(1); - } else { - throw new RuntimeException("Couldn't read response!"); - } - } - - public static String upload(final File file) throws IOException { - final StringBuilder content = new StringBuilder(); - List lines = new ArrayList<>(); - try (BufferedReader reader = new BufferedReader(new FileReader(file))) { - String line; - int i = 0; - while ((line = reader.readLine()) != null) { - lines.add(line); - } - } - for (int i = Math.max(0, lines.size() - 1000); i < lines.size(); i++) { - content.append(lines.get(i)).append("\n"); - } - return upload(content.toString()); - } - - public static String debugPaste() throws IOException { - String settingsYML = HastebinUtility.upload(new File(Fawe.imp().getDirectory(), "config.yml")); - String messagesYML = HastebinUtility.upload(new File(Fawe.imp().getDirectory(), "message.yml")); - String commandsYML = HastebinUtility.upload(new File(Fawe.imp().getDirectory(), "commands.yml")); - String latestLOG; - try { - latestLOG = HastebinUtility.upload(new File(Fawe.imp().getDirectory(), "../../logs/latest.log")); - } catch (IOException ignored) { - latestLOG = "too big :("; - } - StringBuilder b = new StringBuilder(); - b.append( - "# Welcome to this paste\n# It is meant to provide us at IntellectualSites with better information about your " - + "problem\n\n# We will start with some informational files\n"); - b.append("links.config_yml: ").append(settingsYML).append('\n'); - b.append("links.messages_yml: ").append(messagesYML).append('\n'); - b.append("links.commands_yml: ").append(commandsYML).append('\n'); - b.append("links.latest_log: ").append(latestLOG).append('\n'); - b.append("\n# Server Information\n"); - b.append("server.platform: ").append(Fawe.imp().getPlatform()).append('\n'); - b.append(Fawe.imp().getDebugInfo()).append('\n'); - b.append("\n\n# YAY! Now, let's see what we can find in your JVM\n"); - Runtime runtime = Runtime.getRuntime(); - b.append("memory.free: ").append(runtime.freeMemory()).append('\n'); - b.append("memory.max: ").append(runtime.maxMemory()).append('\n'); - b.append("java.specification.version: '").append(System.getProperty("java.specification.version")).append("'\n"); - b.append("java.vendor: '").append(System.getProperty("java.vendor")).append("'\n"); - b.append("java.version: '").append(System.getProperty("java.version")).append("'\n"); - b.append("os.arch: '").append(System.getProperty("os.arch")).append("'\n"); - b.append("os.name: '").append(System.getProperty("os.name")).append("'\n"); - b.append("os.version: '").append(System.getProperty("os.version")).append("'\n\n"); - b.append("# Okay :D Great. You are now ready to create your bug report!"); - b.append("\n# You can do so at https://github.com/boy0001/FastAsyncWorldedit/issues"); - - String link = HastebinUtility.upload(b.toString()); - return link; - } - -} diff --git a/worldedit-core/src/main/java/com/boydti/fawe/util/IncendoPaster.java b/worldedit-core/src/main/java/com/boydti/fawe/util/IncendoPaster.java new file mode 100644 index 000000000..db8b2ab57 --- /dev/null +++ b/worldedit-core/src/main/java/com/boydti/fawe/util/IncendoPaster.java @@ -0,0 +1,261 @@ +package com.boydti.fawe.util; + +import com.boydti.fawe.Fawe; +import com.google.common.base.Charsets; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; + +import java.io.*; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLConnection; +import java.nio.file.Files; +import java.util.*; + +/** + * Single class paster for the Incendo paste service + * + * @author Sauilitired + */ +@SuppressWarnings({"unused", "WeakerAccess"}) +public final class IncendoPaster { + + /** + * Upload service URL + */ + public static final String UPLOAD_PATH = "https://incendo.org/paste/upload"; + /** + * Valid paste applications + */ + public static final Collection + VALID_APPLICATIONS = Arrays + .asList("plotsquared", "fastasyncworldedit", "incendopermissions", "kvantum"); + + private final Collection files = new ArrayList<>(); + private final String pasteApplication; + + /** + * Construct a new paster + * + * @param pasteApplication The application that is sending the paste + */ + public IncendoPaster(final String pasteApplication) { + if (pasteApplication == null || pasteApplication.isEmpty()) { + throw new IllegalArgumentException("paste application cannot be null, nor empty"); + } + if (!VALID_APPLICATIONS.contains(pasteApplication.toLowerCase(Locale.ENGLISH))) { + throw new IllegalArgumentException( + String.format("Unknown application name: %s", pasteApplication)); + } + this.pasteApplication = pasteApplication; + } + + /** + * Get an immutable collection containing all the files that have been added to this paster + * + * @return Unmodifiable collection + */ + public final Collection getFiles() { + return Collections.unmodifiableCollection(this.files); + } + + /** + * Add a file to the paster + * + * @param file File to paste + */ + public void addFile(final PasteFile file) { + if (file == null) { + throw new IllegalArgumentException("File cannot be null"); + } + // Check to see that no duplicate files are submitted + for (final PasteFile pasteFile : this.files) { + if (pasteFile.fileName.equalsIgnoreCase(file.getFileName())) { + throw new IllegalArgumentException(String.format("Found duplicate file with name %s", + file.getFileName())); + } + } + this.files.add(file); + } + + /** + * Create a JSON string from the submitted information + * + * @return compiled JSON string + */ + private String toJsonString() { + final StringBuilder builder = new StringBuilder("{\n"); + builder.append("\"paste_application\": \"").append(this.pasteApplication).append("\",\n\"files\": \""); + Iterator fileIterator = this.files.iterator(); + while (fileIterator.hasNext()) { + final PasteFile file = fileIterator.next(); + builder.append(file.getFileName()); + if (fileIterator.hasNext()) { + builder.append(","); + } + } + builder.append("\",\n"); + fileIterator = this.files.iterator(); + while (fileIterator.hasNext()) { + final PasteFile file = fileIterator.next(); + builder.append("\"file-").append(file.getFileName()).append("\": \"") + .append(file.getContent().replaceAll("\"", "\\\\\"")).append("\""); + if (fileIterator.hasNext()) { + builder.append(",\n"); + } + } + builder.append("\n}"); + return builder.toString(); + } + + /** + * Upload the paste and return the status message + * + * @return Status message + * @throws Throwable any and all exceptions + */ + public final String upload() throws Throwable { + final URL url = new URL(UPLOAD_PATH); + final URLConnection connection = url.openConnection(); + final HttpURLConnection httpURLConnection = (HttpURLConnection) connection; + httpURLConnection.setRequestMethod("POST"); + httpURLConnection.setDoOutput(true); + final byte[] content = toJsonString().getBytes(Charsets.UTF_8); + httpURLConnection.setFixedLengthStreamingMode(content.length); + httpURLConnection.setRequestProperty("Content-Type", "application/json"); + httpURLConnection.setRequestProperty("Accept", "*/*"); + httpURLConnection.connect(); + try (final OutputStream stream = httpURLConnection.getOutputStream()) { + stream.write(content); + } + if (!httpURLConnection.getResponseMessage().contains("OK")) { + throw new IllegalStateException(String.format("Server returned status: %d %s", + httpURLConnection.getResponseCode(), httpURLConnection.getResponseMessage())); + } + final StringBuilder input = new StringBuilder(); + try (final BufferedReader inputStream = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()))) { + String line; + while ((line = inputStream.readLine()) != null) { + input.append(line).append("\n"); + } + } + return input.toString(); + } + + /** + * Simple class that represents a paste file + */ + public static class PasteFile { + + private final String fileName; + private final String content; + + /** + * Construct a new paste file + * + * @param fileName File name, cannot be empty, nor null + * @param content File content, cannot be empty, nor null + */ + public PasteFile(final String fileName, final String content) { + if (fileName == null || fileName.isEmpty()) { + throw new IllegalArgumentException("file name cannot be null, nor empty"); + } + if (content == null || content.isEmpty()) { + throw new IllegalArgumentException("content cannot be null, nor empty"); + } + this.fileName = fileName; + this.content = content; + } + + /** + * Get the file name + * + * @return File name + */ + public String getFileName() { + return this.fileName; + } + + /** + * Get the file content as a single string + * + * @return File content + */ + public String getContent() { + return this.content; + } + } + + public static String debugPaste() throws IOException { + final IncendoPaster incendoPaster = new IncendoPaster("fastasyncworldedit"); + + StringBuilder b = new StringBuilder(); + b.append( + "# Welcome to this paste\n# It is meant to provide us at IntellectualSites with better information about your " + + "problem\n"); + b.append("\n# Server Information\n"); + b.append("server.platform: ").append(Fawe.imp().getPlatform()).append('\n'); + b.append(Fawe.imp().getDebugInfo()).append('\n'); + b.append("\n\n# YAY! Now, let's see what we can find in your JVM\n"); + Runtime runtime = Runtime.getRuntime(); + b.append("memory.free: ").append(runtime.freeMemory()).append('\n'); + b.append("memory.max: ").append(runtime.maxMemory()).append('\n'); + b.append("java.specification.version: '").append(System.getProperty("java.specification.version")).append("'\n"); + b.append("java.vendor: '").append(System.getProperty("java.vendor")).append("'\n"); + b.append("java.version: '").append(System.getProperty("java.version")).append("'\n"); + b.append("os.arch: '").append(System.getProperty("os.arch")).append("'\n"); + b.append("os.name: '").append(System.getProperty("os.name")).append("'\n"); + b.append("os.version: '").append(System.getProperty("os.version")).append("'\n\n"); + b.append("# Okay :D Great. You are now ready to create your bug report!"); + b.append("\n# You can do so at https://github.com/boy0001/FastAsyncWorldedit/issues"); + incendoPaster.addFile(new IncendoPaster.PasteFile("information", b.toString())); + + try { + final File logFile = new File(Fawe.imp().getDirectory(), "../../logs/latest.log"); + final String file; + if (Files.size(logFile.toPath()) > 14_000_000) { + file = "too big :("; + } else { + file = readFile(logFile); + } + incendoPaster.addFile(new IncendoPaster.PasteFile("latest.log", file)); + } catch (IOException ignored) { + } + + incendoPaster.addFile(new PasteFile("config.yml", readFile(new File(Fawe.imp().getDirectory(), "config.yml")))); + incendoPaster.addFile(new PasteFile("message.yml", readFile(new File(Fawe.imp().getDirectory(), "message.yml")))); + incendoPaster.addFile(new PasteFile("commands.yml", readFile(new File(Fawe.imp().getDirectory(), "commands.yml")))); + + final String rawResponse; + try { + rawResponse = incendoPaster.upload(); + } catch (Throwable throwable) { + throw new IOException(String.format("Failed to upload files: %s", throwable.getMessage()), throwable); + } + final JsonObject jsonObject = new JsonParser().parse(rawResponse).getAsJsonObject(); + + if (jsonObject.has("created")) { + final String pasteId = jsonObject.get("paste_id").getAsString(); + return String.format("https://incendo.org/paste/view/%s", pasteId); + } else { + throw new IOException(String.format("Failed to upload files: %s", + jsonObject.get("response").getAsString())); + } + } + + private static String readFile(final File file) throws IOException { + final StringBuilder content = new StringBuilder(); + final List lines = new ArrayList<>(); + try (final BufferedReader reader = new BufferedReader(new FileReader(file))) { + String line; + while ((line = reader.readLine()) != null) { + lines.add(line); + } + } + for (int i = Math.max(0, lines.size() - 1000); i < lines.size(); i++) { + content.append(lines.get(i)).append("\n"); + } + return content.toString(); + } + +} diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/WorldEditCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/WorldEditCommands.java index 8caa07c09..0de3b7a17 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/WorldEditCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/WorldEditCommands.java @@ -24,10 +24,7 @@ import com.boydti.fawe.FaweVersion; import com.boydti.fawe.config.BBC; import com.boydti.fawe.config.Settings; import com.boydti.fawe.object.FawePlayer; -import com.boydti.fawe.util.HastebinUtility; -import com.boydti.fawe.util.StringMan; -import com.boydti.fawe.util.TaskManager; -import com.boydti.fawe.util.Updater; +import com.boydti.fawe.util.*; import com.sk89q.minecraft.util.commands.Command; import com.sk89q.minecraft.util.commands.CommandContext; import com.sk89q.minecraft.util.commands.CommandPermissions; @@ -189,7 +186,7 @@ public class WorldEditCommands { ) @CommandPermissions("worldedit.debugpaste") public void debugpaste(Actor actor) throws WorldEditException, IOException { - BBC.DOWNLOAD_LINK.send(actor, HastebinUtility.debugPaste()); + BBC.DOWNLOAD_LINK.send(actor, IncendoPaster.debugPaste()); } @Command( From b200744d57d3c737f98f0f3260f87f56aa15e818 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Thu, 10 Jan 2019 14:46:10 +0100 Subject: [PATCH 02/10] Cya hastebin --- .../java/com/sk89q/worldedit/command/WorldEditCommands.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/WorldEditCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/WorldEditCommands.java index 0de3b7a17..d1d532a4f 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/WorldEditCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/WorldEditCommands.java @@ -180,7 +180,7 @@ public class WorldEditCommands { @Command( aliases = {"debugpaste"}, usage = "", - desc = "Upload debug information to hastebin.com", + desc = "Upload latest.log, config.yml, message.yml and your commands.yml to https://incendo.org", min = 0, max = 0 ) From c0c0db0d6e5669fd5211c760377f6e62884b1d72 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Thu, 10 Jan 2019 14:57:32 +0100 Subject: [PATCH 03/10] Adding discord to debugpaste --- .../src/main/java/com/boydti/fawe/util/IncendoPaster.java | 1 + 1 file changed, 1 insertion(+) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/util/IncendoPaster.java b/worldedit-core/src/main/java/com/boydti/fawe/util/IncendoPaster.java index db8b2ab57..4f0ce28e2 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/util/IncendoPaster.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/util/IncendoPaster.java @@ -208,6 +208,7 @@ public final class IncendoPaster { b.append("os.version: '").append(System.getProperty("os.version")).append("'\n\n"); b.append("# Okay :D Great. You are now ready to create your bug report!"); b.append("\n# You can do so at https://github.com/boy0001/FastAsyncWorldedit/issues"); + b.append("\n# or via our Discord at https://discord.gg/ngZCzbU"); incendoPaster.addFile(new IncendoPaster.PasteFile("information", b.toString())); try { From f5e8a407cc5755de2aa0e784ae4c5462d0936f1f Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Sat, 12 Jan 2019 18:00:39 +0100 Subject: [PATCH 04/10] Create ISSUE_TEMPLATE.md --- ISSUE_TEMPLATE.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ISSUE_TEMPLATE.md diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..ff84251a8 --- /dev/null +++ b/ISSUE_TEMPLATE.md @@ -0,0 +1,19 @@ +# Bug report for FastAsyncWorldEdit 1.13.x + + + +**Debug paste link**: + + +**Description of the problem:** + + +**How to replicate**: + + +**Checklist**: + +- [] I included a `/fawe debugpaste` link +- [] I made sure there aren't duplicates of this report [(Use Search)](https://github.com/IntellectualSites/FastAsyncWorldEdit-1.13/issues?utf8=%E2%9C%93&q=is%3Aissue) +- [] I made sure I am using an up-to-date version of [FAWE for 1.13.x](https://ci.athion.net/job/FAWE-1.13/) +- [] I made sure the bug/error is not caused by any other plugin From 88b665f141c204248d804eac1541fb2053ee581f Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Sat, 12 Jan 2019 18:01:14 +0100 Subject: [PATCH 05/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c0b87b6d7..973c8968a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ FAWE is a fork of WorldEdit that has huge speed and memory improvements and cons * [Spigot Page](https://www.spigotmc.org/threads/fast-async-worldedit.100104/) * [Discord](https://discord.gg/ngZCzbU) * [Wiki](https://github.com/boy0001/FastAsyncWorldedit/wiki) -* [Report Issue](https://github.com/boy0001/FastAsyncWorldedit/issues/new) +* [Report Issue](https://github.com/IntellectualSites/FastAsyncWorldEdit-1.13/issues/new) ## Downloads ### 1.13+ From d48ea909b551dc1579a89f3dc7a6caeb8a0c1d41 Mon Sep 17 00:00:00 2001 From: Cygaan <30848157+Cygaan@users.noreply.github.com> Date: Mon, 28 Jan 2019 17:31:29 +0100 Subject: [PATCH 06/10] Actually filter out players, not everything else --- .../sk89q/worldedit/function/operation/ForwardExtentCopy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java index 30a978121..5479e4ce8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java @@ -353,7 +353,7 @@ public class ForwardExtentCopy implements Operation { entities = source.getEntities() .stream() .filter(entity -> entity.getState() != null && - entity.getState().getType().getId().equals("minecraft:player")) + !entity.getState().getType().getId().equals("minecraft:player")) .collect(Collectors.toList()); } else { entities = new ArrayList<>(); From 6046fa1cec3a5c7db08d7a98c5a3494ea42b4b3c Mon Sep 17 00:00:00 2001 From: Cygaan <30848157+Cygaan@users.noreply.github.com> Date: Mon, 28 Jan 2019 17:36:39 +0100 Subject: [PATCH 07/10] Only copy entities from within the region --- .../sk89q/worldedit/function/operation/ForwardExtentCopy.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java index 5479e4ce8..b8018657c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/ForwardExtentCopy.java @@ -353,7 +353,8 @@ public class ForwardExtentCopy implements Operation { entities = source.getEntities() .stream() .filter(entity -> entity.getState() != null && - !entity.getState().getType().getId().equals("minecraft:player")) + !entity.getState().getType().getId().equals("minecraft:player") && + region.contains(entity.getLocation().toVector())) .collect(Collectors.toList()); } else { entities = new ArrayList<>(); From e724b1f1cdd14a96c95c1441e2781f37ebaf2162 Mon Sep 17 00:00:00 2001 From: Gerrygames Date: Fri, 1 Feb 2019 13:40:22 +0100 Subject: [PATCH 08/10] fix NPE when reading sponge schematics with tile entities or entities --- .../worldedit/extent/clipboard/io/SpongeSchematicReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java index 4c54af4e8..a33dc7c1e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java @@ -210,6 +210,7 @@ public class SpongeSchematicReader extends NBTSchematicReader { }); streamer.readFully(); if (fc == null) setupClipboard(length * width * height, uuid); + else fc.setDimensions(new Vector(width, height, length)); Vector origin = min; CuboidRegion region; if (offsetX != Integer.MIN_VALUE && offsetY != Integer.MIN_VALUE && offsetZ != Integer.MIN_VALUE) { @@ -242,7 +243,6 @@ public class SpongeSchematicReader extends NBTSchematicReader { } } } - fc.setDimensions(new Vector(width, height, length)); clipboard.init(region, fc); clipboard.setOrigin(origin); return clipboard; From f6788f16e4d85ca1ad03b0d59a419a9fb9ce5746 Mon Sep 17 00:00:00 2001 From: Byron Marohn Date: Wed, 6 Feb 2019 20:48:30 -0800 Subject: [PATCH 09/10] Fix sponge schematics not correctly setting dimensions if there are no entities Signed-off-by: Byron Marohn --- .../worldedit/extent/clipboard/io/SpongeSchematicReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java index a33dc7c1e..31aed23d3 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java @@ -210,7 +210,7 @@ public class SpongeSchematicReader extends NBTSchematicReader { }); streamer.readFully(); if (fc == null) setupClipboard(length * width * height, uuid); - else fc.setDimensions(new Vector(width, height, length)); + fc.setDimensions(new Vector(width, height, length)); Vector origin = min; CuboidRegion region; if (offsetX != Integer.MIN_VALUE && offsetY != Integer.MIN_VALUE && offsetZ != Integer.MIN_VALUE) { From a64ff8f299bbba84391e9153dc0a87140a49449d Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Sun, 24 Mar 2019 20:58:05 +0100 Subject: [PATCH 10/10] Make master build (probably) --- build.gradle | 3 +-- worldedit-core/build.gradle | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index a2dab283d..afd809465 100644 --- a/build.gradle +++ b/build.gradle @@ -75,7 +75,6 @@ subprojects { repositories { mavenCentral() - maven { url "http://repo.bukkit.org/content/groups/public" } maven { url "http://maven.sk89q.com/repo/" } maven { url "http://repo.maven.apache.org/maven2" } // Fawe @@ -83,7 +82,7 @@ subprojects { maven {url "https://mvnrepository.com/artifact/"} maven {url "http://repo.dmulloy2.net/content/groups/public/"} maven {url "https://repo.destroystokyo.com/repository/maven-public//"} - maven {url "http://ci.athion.net/job/PlotSquared/ws/mvn/"} + maven {url "http://ci.athion.net/job/PlotSquared-Legacy/ws/mvn/"} mavenLocal() maven {url "http://empcraft.com/maven2"} maven {url "https://hub.spigotmc.org/nexus/content/groups/public/"} diff --git a/worldedit-core/build.gradle b/worldedit-core/build.gradle index c140d1989..44a697af4 100644 --- a/worldedit-core/build.gradle +++ b/worldedit-core/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'eclipse' apply plugin: 'idea' repositories { - maven {url "http://ci.athion.net/job/PlotSquared/ws/mvn/"} + maven {url "http://ci.athion.net/job/PlotSquared-Legacy/ws/mvn/"} } dependencies { compile 'de.schlichtherle:truezip:6.8.3'