Fixed for below-world blocks

This commit is contained in:
Auxilor 2021-02-08 21:45:43 +00:00
parent c825252850
commit 8bc7062761
4 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ public final class BlockBreak implements BlockBreakProxy {
@Override
public void breakBlock(@NotNull final Player player,
@NotNull final Block block) {
if (block.getY() > 255) {
if (block.getY() > 255 || block.getY() < 0) {
return;
}
((CraftPlayer) player).getHandle().playerInteractManager.breakBlock(new BlockPosition(block.getX(), block.getY(), block.getZ()));

View File

@ -11,7 +11,7 @@ public final class BlockBreak implements BlockBreakProxy {
@Override
public void breakBlock(@NotNull final Player player,
@NotNull final Block block) {
if (block.getY() > 255) {
if (block.getY() > 255 || block.getY() < 0) {
return;
}
((CraftPlayer) player).getHandle().playerInteractManager.breakBlock(new BlockPosition(block.getX(), block.getY(), block.getZ()));

View File

@ -11,7 +11,7 @@ public final class BlockBreak implements BlockBreakProxy {
@Override
public void breakBlock(@NotNull final Player player,
@NotNull final Block block) {
if (block.getY() > 255) {
if (block.getY() > 255 || block.getY() < 0) {
return;
}
((CraftPlayer) player).getHandle().playerInteractManager.breakBlock(new BlockPosition(block.getX(), block.getY(), block.getZ()));

View File

@ -11,7 +11,7 @@ public final class BlockBreak implements BlockBreakProxy {
@Override
public void breakBlock(@NotNull final Player player,
@NotNull final Block block) {
if (block.getY() > 255) {
if (block.getY() > 255 || block.getY() < 0) {
return;
}
((CraftPlayer) player).getHandle().playerInteractManager.breakBlock(new BlockPosition(block.getX(), block.getY(), block.getZ()));