Skip to content

Commit

Permalink
Revert "misc: 尽可能早地捕获事件"
Browse files Browse the repository at this point in the history
This reverts commit 93ee5ac.
  • Loading branch information
MATRIX-feather committed Nov 13, 2023
1 parent 522eaac commit 3fc42f2
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
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;
Expand Down Expand Up @@ -204,7 +203,7 @@ public void onPlayerHurtEntity(EntityDamageByEntityEvent e)
private PlayerTracker tracker;

/**
* todo: SwingEvent应当只响应方块破坏
* todo: SwingEvent应当只相应方块破坏
*/
@EventHandler
public void onPlayerSwing(PlayerArmSwingEvent e)
Expand Down Expand Up @@ -265,7 +264,7 @@ public void onPlayerSwing(PlayerArmSwingEvent e)
logOperation(player, targetPlayer, lastAction.isLeftClick() ? OperationType.LeftClick : OperationType.RightClick);
}

@EventHandler(priority = EventPriority.LOWEST)
@EventHandler
public void onPlayerInteract(PlayerInteractEvent e)
{
var player = e.getPlayer();
Expand Down Expand Up @@ -295,7 +294,7 @@ public void onPlayerInteract(PlayerInteractEvent e)
logOperation(player, targetPlayer, e.getAction().isLeftClick() ? OperationType.LeftClick : OperationType.RightClick);
}

@EventHandler(priority = EventPriority.LOWEST)
@EventHandler
public void onPlayerInteractAtEntity(PlayerInteractAtEntityEvent e)
{
var player = e.getPlayer();
Expand Down

0 comments on commit 3fc42f2

Please sign in to comment.