-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since Minecraft 1.20, players can edit signs by right-clicking on them, and that poses a problem for the sign-centric portions of the plugin, such as class selection signs and the various types of arena signs. This commit refactors the PlayerInteractEvent handler in ArenaListener in order to break open the possibility of handling non-lobby players as well. We're a little more strict with lobby players, and we still want to handle class sign clicks and iron block clicks here. For players who aren't in the lobby, we're really just blocking the event according to the regular protection rules (block is inside region, protect is on, and arena is not in edit mode). It also blanket cancels events in the HandlesSignClicks event handler, because there is no meaningful way to edit an arena sign, since their contents come from the template file and not from what is written on them by the sign renderer. Ideally, we'd refactor some of this event handler logic, because it's a lot easier to take care of the individual responsibilities in separate event handlers. Fixes #765
- Loading branch information
1 parent
6579c4b
commit e81f3dc
Showing
2 changed files
with
45 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters