More param name fixes
This commit is contained in:
@@ -160,11 +160,11 @@
|
||||
|
||||
slot.setChanged();
|
||||
+ // CraftBukkit start - Make sure the client has the right slot contents
|
||||
+ if (player instanceof ServerPlayer && slot.getMaxStackSize() != 64) {
|
||||
+ ((ServerPlayer) player).connection.send(new ClientboundContainerSetSlotPacket(this.containerId, this.incrementStateId(), slot.index, slot.getItem()));
|
||||
+ if (player instanceof ServerPlayer serverPlayer && slot.getMaxStackSize() != 64) {
|
||||
+ serverPlayer.connection.send(new ClientboundContainerSetSlotPacket(this.containerId, this.incrementStateId(), slot.index, slot.getItem()));
|
||||
+ // Updating a crafting inventory makes the client reset the result slot, have to send it again
|
||||
+ if (this.getBukkitView().getType() == org.bukkit.event.inventory.InventoryType.WORKBENCH || this.getBukkitView().getType() == org.bukkit.event.inventory.InventoryType.CRAFTING) {
|
||||
+ ((ServerPlayer) player).connection.send(new ClientboundContainerSetSlotPacket(this.containerId, this.incrementStateId(), 0, this.getSlot(0).getItem()));
|
||||
+ serverPlayer.connection.send(new ClientboundContainerSetSlotPacket(this.containerId, this.incrementStateId(), 0, this.getSlot(0).getItem()));
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
Reference in New Issue
Block a user