From 84c8b395299035bd49d3d02271bea21bdd9a5b3d Mon Sep 17 00:00:00 2001 From: Yomamaeatstoes Date: Wed, 13 Dec 2023 17:23:32 -0500 Subject: [PATCH 1/5] Folia "compatible" lol Initial Folia support. ( https://github.com/EngineHub/WorldEdit/commit/b7abc4a0bad544546c0588dd2084fe661b5e5f81 ) --- .../sk89q/worldedit/bukkit/BukkitWorld.java | 22 +++---------------- .../src/main/resources/plugin.yml | 1 + 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java index 2f9619e112..2e6d374535 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java @@ -462,25 +462,9 @@ public com.sk89q.worldedit.world.block.BlockState getBlock(BlockVector3 position @Override public > boolean setBlock(BlockVector3 position, B block, SideEffectSet sideEffects) { clearContainerBlockContents(position); - if (worldNativeAccess != null) { - try { - return worldNativeAccess.setBlock(position, block, sideEffects); - } catch (Exception e) { - if (block instanceof BaseBlock baseBlock && baseBlock.getNbt() != null) { - LOGGER.warn("Tried to set a corrupt tile entity at " + position.toString() - + ": " + baseBlock.getNbt(), e); - } else { - LOGGER.warn("Failed to set block via adapter, falling back to generic", e); - } - } - } - if (WorldEditPlugin.getInstance().getLocalConfiguration().unsupportedVersionEditing) { - Block bukkitBlock = getWorld().getBlockAt(position.getBlockX(), position.getBlockY(), position.getBlockZ()); - bukkitBlock.setBlockData(BukkitAdapter.adapt(block), sideEffects.doesApplyAny()); - return true; - } else { - throw new RuntimeException(new UnsupportedVersionEditException()); - } + Block bukkitBlock = getWorld().getBlockAt(position.getBlockX(), position.getBlockY(), position.getBlockZ()); + bukkitBlock.setBlockData(BukkitAdapter.adapt(block), sideEffects.doesApplyAny()); + return true; } @Override diff --git a/worldedit-bukkit/src/main/resources/plugin.yml b/worldedit-bukkit/src/main/resources/plugin.yml index aa19044bb0..49e998ab43 100644 --- a/worldedit-bukkit/src/main/resources/plugin.yml +++ b/worldedit-bukkit/src/main/resources/plugin.yml @@ -5,4 +5,5 @@ load: STARTUP api-version: 1.13 softdepend: [Vault] author: EngineHub +folia-supported: true website: https://enginehub.org/worldedit \ No newline at end of file From bb4ab757902530d89f58cab11a4d88477fb2fe20 Mon Sep 17 00:00:00 2001 From: Yomamaeatstoes <114538961+Yomamaeatstoes@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:35:37 -0500 Subject: [PATCH 2/5] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8cc644a061..43b2fada0c 100644 --- a/README.md +++ b/README.md @@ -84,3 +84,5 @@ YourKit supports open source projects with innovative and intelligent tools for YourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/), [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/), and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/). + +Up-streamed version from https://github.com/TechnicallyCoded/WorldEdit-Fork From 43414bc31df82a5d1279023bb9f3386ee1ceed10 Mon Sep 17 00:00:00 2001 From: Yomamaeatstoes <114538961+Yomamaeatstoes@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:43:42 -0500 Subject: [PATCH 3/5] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 43b2fada0c..18b6aa551a 100644 --- a/README.md +++ b/README.md @@ -85,4 +85,8 @@ YourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/p [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/), and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/). +[Folia-Inquisitors](https://github.com/orgs/Folia-Inquisitors/repositories) +[TechnicallyCoded](https://github.com/TechnicallyCoded) +[Yomamaeatstoes](https://github.com/Yomamaeatstoes) + Up-streamed version from https://github.com/TechnicallyCoded/WorldEdit-Fork From 7f650b5ce81c275c48ff8b71590864827eba0dc1 Mon Sep 17 00:00:00 2001 From: Yomamaeatstoes <114538961+Yomamaeatstoes@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:45:19 -0500 Subject: [PATCH 4/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 18b6aa551a..4f39973752 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ YourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/p [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/), and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/). +# Folia Inquisitors [Folia-Inquisitors](https://github.com/orgs/Folia-Inquisitors/repositories) [TechnicallyCoded](https://github.com/TechnicallyCoded) [Yomamaeatstoes](https://github.com/Yomamaeatstoes) From e58eaccd34f5f41da4343f7bea609f32bb4fd91f Mon Sep 17 00:00:00 2001 From: Yomamaeatstoes <114538961+Yomamaeatstoes@users.noreply.github.com> Date: Sun, 28 Jan 2024 02:47:47 -0500 Subject: [PATCH 5/5] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 4f39973752..2d13f58dcd 100644 --- a/README.md +++ b/README.md @@ -89,5 +89,3 @@ and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/). [Folia-Inquisitors](https://github.com/orgs/Folia-Inquisitors/repositories) [TechnicallyCoded](https://github.com/TechnicallyCoded) [Yomamaeatstoes](https://github.com/Yomamaeatstoes) - -Up-streamed version from https://github.com/TechnicallyCoded/WorldEdit-Fork