9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-29 11:59:11 +00:00

修复严重的发包物品漏洞

This commit is contained in:
XiaoMoMi
2025-08-16 20:15:17 +08:00
parent 4e90278cd9
commit e7ca6a8a3c
2 changed files with 3 additions and 3 deletions

View File

@@ -2241,7 +2241,7 @@ public class PacketConsumers {
// 因为不能走编码器只能替换对象
public static final TriConsumer<NetWorkUser, NMSPacketEvent, Object> CONTAINER_CLICK_1_21_5 = (user, event, packet) -> {
try {
var player = (net.momirealms.craftengine.core.entity.player.Player) user;
BukkitServerPlayer player = (BukkitServerPlayer) user;
int containerId = FastNMS.INSTANCE.field$ServerboundContainerClickPacket$containerId(packet);
int stateId = FastNMS.INSTANCE.field$ServerboundContainerClickPacket$stateId(packet);
short slotNum = FastNMS.INSTANCE.field$ServerboundContainerClickPacket$slotNum(packet);