Fix block action handling (#6213)

This commit is contained in:
Nassim Jahnke
2021-07-17 14:46:46 +02:00
parent 6cb42c485b
commit 95ff18dca7
2 changed files with 4 additions and 28 deletions

View File

@@ -209,15 +209,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return;
}
}
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
double blockDistanceSquared = d0 * d0 + d1 * d1 + d2 * d2;
if (blockDistanceSquared > 40 * 40) {
LOGGER.warn("{} tried to break a block {} square blocks away from their position", this.player.getScoreboardName(), blockDistanceSquared);
- this.disconnect("Invalid block break distance");
+ this.disconnect("Invalid block break distance", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION);
return;
}
if (this.player.level.getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4) == null) {
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) {