Add UnknownNullability to block getter using condition

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2021-11-08 16:43:50 +01:00
parent ae08ac2987
commit c38f46d3b8

View File

@ -3,14 +3,14 @@ package net.minestom.server.instance.block;
import net.minestom.server.coordinate.Point;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.UnknownNullability;
import java.util.Objects;
public interface BlockGetter {
@Nullable Block getBlock(int x, int y, int z, @NotNull Condition condition);
@UnknownNullability Block getBlock(int x, int y, int z, @NotNull Condition condition);
default @Nullable Block getBlock(@NotNull Point point, @NotNull Condition condition) {
default @UnknownNullability Block getBlock(@NotNull Point point, @NotNull Condition condition) {
return getBlock(point.blockX(), point.blockY(), point.blockZ(), condition);
}