From ae2d76553364fa846a601d26716c16deca2714d8 Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Tue, 3 Sep 2019 12:17:21 -0400 Subject: [PATCH] Removed duplicated method and implemented missing ones --- .../com/boydti/fawe/bukkit/wrapper/AsyncWorld.java | 13 ++++++++++++- .../worldedit/bukkit/adapter/BukkitImplAdapter.java | 12 +----------- 2 files changed, 13 insertions(+), 12 deletions(-) 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 93e0b1512..0d878aaeb 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 @@ -23,6 +23,7 @@ import org.bukkit.GameRule; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Particle; +import org.bukkit.Raid; import org.bukkit.Sound; import org.bukkit.SoundCategory; import org.bukkit.StructureType; @@ -55,7 +56,6 @@ import org.bukkit.util.RayTraceResult; import org.bukkit.util.Vector; import org.jetbrains.annotations.NotNull; -import javax.annotation.Nullable; import java.io.File; import java.util.Collection; import java.util.List; @@ -65,6 +65,7 @@ import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.function.Predicate; import java.util.function.Supplier; +import org.jetbrains.annotations.Nullable; /** * Modify the world from an async thread
@@ -1028,6 +1029,16 @@ public class AsyncWorld extends PassthroughExtent implements World { return parent.spigot(); } + @Override + public @Nullable Raid locateNearestRaid(@NotNull Location location, int i) { + return parent.locateNearestRaid(location, i); + } + + @Override + public @NotNull List getRaids() { + return parent.getRaids(); + } + @Override public void setMetadata(final String key, final MetadataValue meta) { TaskManager.IMP.sync(new RunnableVal() { diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplAdapter.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplAdapter.java index a46b8ec71..177f45563 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplAdapter.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplAdapter.java @@ -174,17 +174,6 @@ public interface BukkitImplAdapter extends IBukkitAdapter { */ BaseItemStack adapt(ItemStack itemStack); - - /** - * Retrieve the internal ID for a given state, if possible. - * - * @param state The block state - * @return the internal ID of the state - */ - default OptionalInt getInternalBlockStateId(BlockState state) { - return OptionalInt.empty(); - } - boolean isChunkInUse(Chunk chunk); default BlockMaterial getMaterial(BlockType blockType) { @@ -213,6 +202,7 @@ public interface BukkitImplAdapter extends IBukkitAdapter { * @param state The block state * @return the internal ID of the state */ + default OptionalInt getInternalBlockStateId(BlockState state) { return OptionalInt.empty(); }