From 6476345e449a958f9a3d86db9e774f5a5d68982d Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Fri, 12 Mar 2021 12:23:44 +0100 Subject: [PATCH] Implement missing methods --- .../java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java | 5 +++++ .../java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java | 7 +++++++ .../experimental/fs/FileSystemSnapshotDatabaseTest.java | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java index 62b56964c..20c7abe1f 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java @@ -162,6 +162,11 @@ public class AsyncBlock implements Block { return z; } + @Override + public boolean isValidTool(@Nonnull ItemStack itemStack) { + return getDrops(itemStack).size() !=0; + } + @Nonnull @Override public Location getLocation() { diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java index e7d351d38..0beb65f7a 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java @@ -26,6 +26,7 @@ import org.bukkit.GameRule; import org.bukkit.HeightMap; import org.bukkit.Location; import org.bukkit.Material; +import org.bukkit.NamespacedKey; import org.bukkit.Particle; import org.bukkit.Raid; import org.bukkit.Sound; @@ -1406,6 +1407,12 @@ public class AsyncWorld extends PassthroughExtent implements World { return parent.getChunkAtAsync(x, z, gen, urgent); } + @Override + @NotNull + public NamespacedKey getKey() { + throw new UnsupportedOperationException("FAWE does not support this yet"); + } + @Override public boolean isDayTime() { return parent.isDayTime(); diff --git a/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FileSystemSnapshotDatabaseTest.java b/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FileSystemSnapshotDatabaseTest.java index 1efedf81e..2181ca367 100644 --- a/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FileSystemSnapshotDatabaseTest.java +++ b/worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FileSystemSnapshotDatabaseTest.java @@ -108,7 +108,7 @@ class FileSystemSnapshotDatabaseTest { reader.close(); } - TEMP_DIR = Files.createTempDirectory("worldedit-fs-snap-dbs"); + TEMP_DIR = Files.createTempDirectory("worldedit-fs-snap-dbs").toRealPath(); } @AfterAll