From a33f0164b6bfb8bb538ee55392ff7f9429267c4a Mon Sep 17 00:00:00 2001 From: Andreas Troelsen Date: Tue, 23 Jul 2024 03:58:46 +0200 Subject: [PATCH] Fix arena sign event handler priority. The previous change to this class introduced a _mutating_ method call, which would be fine if it wasn't for the fact that the handler listened on `MONITOR` priority prior to this commit. But no more! We're knocking it down a notch to better comply with event handler best practices. While this change doesn't _fix_ #787, it does allow @molor to implement a hackaround that should keep things in check until we can bump up to a later API version and use the new sign edit event to fix this particular issue the right way. --- .../java/com/garbagemule/MobArena/signs/HandlesSignClicks.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/garbagemule/MobArena/signs/HandlesSignClicks.java b/src/main/java/com/garbagemule/MobArena/signs/HandlesSignClicks.java index c5b8804..6469950 100644 --- a/src/main/java/com/garbagemule/MobArena/signs/HandlesSignClicks.java +++ b/src/main/java/com/garbagemule/MobArena/signs/HandlesSignClicks.java @@ -29,7 +29,7 @@ class HandlesSignClicks implements Listener { this.cooldowns = new HashMap<>(); } - @EventHandler(priority = EventPriority.MONITOR) + @EventHandler(priority = EventPriority.HIGHEST) public void on(PlayerInteractEvent event) { Block block = event.getClickedBlock(); if (block == null) {