本帖最后由 龙吟y 于 2022-1-14 18:33 编辑
Action action = e.getAction();
可以获取到 Action.LEFT_CLICK_AIR
但是如果右键的话 只能获取到 Action.RIGHT_CLICK_BLOCK
Action action = e.getAction();
可以获取到 Action.LEFT_CLICK_AIR
但是如果右键的话 只能获取到 Action.RIGHT_CLICK_BLOCK

我知道的,只不过 右键空气不触发 PlayerInteractEvent
空手右键空气我记得得将监听器等级设置低一些(可能不是,太久没用):@EventHandler(priority = EventPriority.LOWEST)
文档里解释了为什么:https://bukkit.windit.net/javado ... rInteractEvent.html
文档里解释了为什么:https://bukkit.windit.net/javado ... rInteractEvent.html
结冰的离季 发表于 2022-1-14 22:02
空手右键空气我记得得将监听器等级设置低一些(可能不是,太久没用):@EventHandler(priority = EventPriorit ...
我试过,也是监听不到右键空气