Remove unused warning (#12478)

This commit is contained in:
SpigotRCE
2025-04-25 14:16:06 +05:30
committed by GitHub
parent a112d37025
commit a211ac2ec5

View File

@@ -1237,14 +1237,21 @@
} else { } else {
Component component1 = Component.translatable("build.tooHigh", maxY).withStyle(ChatFormatting.RED); Component component1 = Component.translatable("build.tooHigh", maxY).withStyle(ChatFormatting.RED);
this.player.sendSystemMessage(component1, true); this.player.sendSystemMessage(component1, true);
@@ -1268,6 +_,7 @@ @@ -1268,13 +_,7 @@
this.player.connection.send(new ClientboundBlockUpdatePacket(serverLevel, blockPos)); this.player.connection.send(new ClientboundBlockUpdatePacket(serverLevel, blockPos));
this.player.connection.send(new ClientboundBlockUpdatePacket(serverLevel, blockPos.relative(direction))); this.player.connection.send(new ClientboundBlockUpdatePacket(serverLevel, blockPos.relative(direction)));
- } else {
- LOGGER.warn(
- "Rejecting UseItemOnPacket from {}: Location {} too far away from hit block {}.",
- this.player.getGameProfile().getName(),
- location,
- blockPos
- );
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.updateEquipmentOnPlayerActions) this.player.detectEquipmentUpdates(); // Paper - Force update attributes. + if (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.updateEquipmentOnPlayerActions) this.player.detectEquipmentUpdates(); // Paper - Force update attributes.
} else { }
LOGGER.warn( }
"Rejecting UseItemOnPacket from {}: Location {} too far away from hit block {}.", }
@@ -1284,6 +_,8 @@ @@ -1284,6 +_,8 @@
@Override @Override
public void handleUseItem(ServerboundUseItemPacket packet) { public void handleUseItem(ServerboundUseItemPacket packet) {