We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
运行环境
Minecraft版本(1.12.2/1.16.5/1.18.2): 1.18.2 构建版本(从/version指令获取): bc64e1f 相关模组/插件: 如下案例
@EventHandler public void onInteract(PlayerInteractEvent e) { String u = UUID.randomUUID().toString(); Player p = e.getPlayer(); ItemStack i = e.getItem(); EquipmentSlot h = e.getHand(); Block cb = e.getClickedBlock(); p.sendMessage(u + " hash: " + e.hashCode()); p.sendMessage(u + " material: " + e.getMaterial().name()); p.sendMessage(u + " hasBlock: " + e.hasBlock()); p.sendMessage(u + " hasItem: " + e.hasItem()); p.sendMessage(u + " itemType: " + (i == null ? null : i.getType().name())); p.sendMessage(u + " action: " + e.getAction().name()); p.sendMessage(u + " blockFace: " + e.getBlockFace().name()); p.sendMessage(u + " hand: "+ (h == null ? null : h.name())); p.sendMessage(u + " clickedBlock: "+ (cb == null ? null : cb.getType().name() + " " + cb.getX() + " " + cb.getY() + " " + cb.getZ())); }
描述这个BUG
互动空气时,PlayerInteractEvent 正常触发一次
互动方块时,PlayerInteractEvent 异常触发两次
导致的问题
PlayerInteractEvent 相关的 handlers 及逻辑被二次触发
The text was updated successfully, but these errors were encountered:
正常逻辑
Sorry, something went wrong.
这个再观察一下吧 我印象里这个逻辑是没问题的
No branches or pull requests
运行环境
Minecraft版本(1.12.2/1.16.5/1.18.2): 1.18.2
构建版本(从/version指令获取): bc64e1f
相关模组/插件: 如下案例
描述这个BUG
导致的问题
PlayerInteractEvent 相关的 handlers 及逻辑被二次触发
The text was updated successfully, but these errors were encountered: