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 diff --git a/README.md b/README.md index c817dbf5a..c8494060a 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+ 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 9156a6850..58fb8fa6b 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 @@ -28,8 +28,8 @@ public final class IncendoPaster { * Valid paste applications */ public static final Collection - VALID_APPLICATIONS = Arrays - .asList("plotsquared", "fastasyncworldedit", "incendopermissions", "kvantum"); + VALID_APPLICATIONS = Arrays + .asList("plotsquared", "fastasyncworldedit", "incendopermissions", "kvantum"); private final Collection files = new ArrayList<>(); private final String pasteApplication; @@ -45,7 +45,7 @@ public final class IncendoPaster { } if (!VALID_APPLICATIONS.contains(pasteApplication.toLowerCase(Locale.ENGLISH))) { throw new IllegalArgumentException( - String.format("Unknown application name: %s", pasteApplication)); + String.format("Unknown application name: %s", pasteApplication)); } this.pasteApplication = pasteApplication; } @@ -72,7 +72,7 @@ public final class IncendoPaster { 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())); + file.getFileName())); } } this.files.add(file); @@ -99,7 +99,7 @@ public final class IncendoPaster { while (fileIterator.hasNext()) { final PasteFile file = fileIterator.next(); builder.append("\"file-").append(file.getFileName()).append("\": \"") - .append(file.getContent().replaceAll("\"", "\\\\\"")).append("\""); + .append(file.getContent().replaceAll("\"", "\\\\\"")).append("\""); if (fileIterator.hasNext()) { builder.append(",\n"); } @@ -130,7 +130,7 @@ public final class IncendoPaster { } if (!httpURLConnection.getResponseMessage().contains("OK")) { throw new IllegalStateException(String.format("Server returned status: %d %s", - httpURLConnection.getResponseCode(), httpURLConnection.getResponseMessage())); + httpURLConnection.getResponseCode(), httpURLConnection.getResponseMessage())); } final StringBuilder input = new StringBuilder(); try (final BufferedReader inputStream = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()))) { @@ -191,9 +191,10 @@ public final class IncendoPaster { 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"); + "# 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(); @@ -240,7 +241,7 @@ public final class IncendoPaster { 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())); + jsonObject.get("response").getAsString())); } } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ScriptingCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ScriptingCommands.java index 29fb1b916..a8e9e911f 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ScriptingCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ScriptingCommands.java @@ -79,8 +79,6 @@ public class ScriptingCommands { } public static T runScript(Actor actor, File f, String[] args, @Nullable Function processor) throws WorldEditException { - Request.reset(); - String filename = f.getPath(); int index = filename.lastIndexOf("."); String ext = filename.substring(index + 1, filename.length()); @@ -188,7 +186,7 @@ public class ScriptingCommands { player.printError("More info: https://github.com/boy0001/CraftScripts/"); return; } - this.worldEdit.runScript(LocationMaskedPlayerWrapper.unwrap(player), f, scriptArgs); + runScript(LocationMaskedPlayerWrapper.unwrap(player), f, scriptArgs); } @Command(aliases = {".s"}, usage = "[args...]", desc = "Execute last CraftScript", min = 0, max = -1) 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 dc0ca7330..301640c03 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 @@ -200,7 +200,6 @@ public class WorldEditCommands { @CommandPermissions("worldedit.debugpaste") public void debugpaste(Actor actor) throws WorldEditException, IOException { BBC.DOWNLOAD_LINK.send(actor, IncendoPaster.debugPaste()); - } @Command( 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 2205a4937..0504c6bae 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 @@ -356,7 +356,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<>();