From 93ee5ac6076a1b7324cd5567147226a892646cc7 Mon Sep 17 00:00:00 2001 From: MATRIX-feather Date: Mon, 13 Nov 2023 13:52:14 +0800 Subject: [PATCH] =?UTF-8?q?misc:=20=E5=B0=BD=E5=8F=AF=E8=83=BD=E6=97=A9?= =?UTF-8?q?=E5=9C=B0=E6=8D=95=E8=8E=B7=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xiamomc/morph/events/InteractionMirrorProcessor.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/xiamomc/morph/events/InteractionMirrorProcessor.java b/src/main/java/xiamomc/morph/events/InteractionMirrorProcessor.java index f6d7f223..27a738e0 100644 --- a/src/main/java/xiamomc/morph/events/InteractionMirrorProcessor.java +++ b/src/main/java/xiamomc/morph/events/InteractionMirrorProcessor.java @@ -7,6 +7,7 @@ import org.bukkit.GameMode; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.entity.EntityDamageByEntityEvent; @@ -203,7 +204,7 @@ public void onPlayerHurtEntity(EntityDamageByEntityEvent e) private PlayerTracker tracker; /** - * todo: SwingEvent应当只相应方块破坏 + * todo: SwingEvent应当只响应方块破坏 */ @EventHandler public void onPlayerSwing(PlayerArmSwingEvent e) @@ -264,7 +265,7 @@ public void onPlayerSwing(PlayerArmSwingEvent e) logOperation(player, targetPlayer, lastAction.isLeftClick() ? OperationType.LeftClick : OperationType.RightClick); } - @EventHandler + @EventHandler(priority = EventPriority.LOWEST) public void onPlayerInteract(PlayerInteractEvent e) { var player = e.getPlayer(); @@ -288,7 +289,7 @@ public void onPlayerInteract(PlayerInteractEvent e) logOperation(player, targetPlayer, e.getAction().isLeftClick() ? OperationType.LeftClick : OperationType.RightClick); } - @EventHandler + @EventHandler(priority = EventPriority.LOWEST) public void onPlayerInteractAtEntity(PlayerInteractAtEntityEvent e) { var player = e.getPlayer();