Removed duplicated method and implemented missing ones

This commit is contained in:
MattBDev 2019-09-03 12:17:21 -04:00
parent c03015adc8
commit ae2d765533
2 changed files with 13 additions and 12 deletions

View File

@ -23,6 +23,7 @@ import org.bukkit.GameRule;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.Particle; import org.bukkit.Particle;
import org.bukkit.Raid;
import org.bukkit.Sound; import org.bukkit.Sound;
import org.bukkit.SoundCategory; import org.bukkit.SoundCategory;
import org.bukkit.StructureType; import org.bukkit.StructureType;
@ -55,7 +56,6 @@ import org.bukkit.util.RayTraceResult;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import javax.annotation.Nullable;
import java.io.File; import java.io.File;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -65,6 +65,7 @@ import java.util.UUID;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.function.Predicate; import java.util.function.Predicate;
import java.util.function.Supplier; import java.util.function.Supplier;
import org.jetbrains.annotations.Nullable;
/** /**
* Modify the world from an async thread<br> * Modify the world from an async thread<br>
@ -1028,6 +1029,16 @@ public class AsyncWorld extends PassthroughExtent implements World {
return parent.spigot(); return parent.spigot();
} }
@Override
public @Nullable Raid locateNearestRaid(@NotNull Location location, int i) {
return parent.locateNearestRaid(location, i);
}
@Override
public @NotNull List<Raid> getRaids() {
return parent.getRaids();
}
@Override @Override
public void setMetadata(final String key, final MetadataValue meta) { public void setMetadata(final String key, final MetadataValue meta) {
TaskManager.IMP.sync(new RunnableVal<Object>() { TaskManager.IMP.sync(new RunnableVal<Object>() {

View File

@ -174,17 +174,6 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
*/ */
BaseItemStack adapt(ItemStack itemStack); 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); boolean isChunkInUse(Chunk chunk);
default BlockMaterial getMaterial(BlockType blockType) { default BlockMaterial getMaterial(BlockType blockType) {
@ -213,6 +202,7 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
* @param state The block state * @param state The block state
* @return the internal ID of the state * @return the internal ID of the state
*/ */
default OptionalInt getInternalBlockStateId(BlockState state) { default OptionalInt getInternalBlockStateId(BlockState state) {
return OptionalInt.empty(); return OptionalInt.empty();
} }