Make /ma playerlist pattern less greedy.

This commit changes the pattern of the player list command to one that
isn't quite as greedy. This change is enough to fix issue #676 and thus
allow MobArenaStats to take control of its own command.

The command framework could definitely do with a bit of a rework away
from pattern matching towards aliases, which would prevent similar
issues from cropping up down the line. For now, this is good enough.

Fixes #676
This commit is contained in:
Andreas Troelsen 2021-07-01 21:19:25 +02:00
parent 2c2c36b880
commit 614da20df8
2 changed files with 3 additions and 1 deletions

View File

@ -11,6 +11,8 @@ These changes will (most likely) be included in the next version.
## [Unreleased]
### Changed
- The regex pattern for the player list command is now less greedy, so it will only match on `/ma players`, `/ma playerlist`, and `/ma player-list`. The previous pattern matched on anything that starts with `player`, which rendered the `/ma player-stats` command in MobArenaStats impossible to invoke.
## [0.106] - 2021-05-09
### Added

View File

@ -14,7 +14,7 @@ import java.util.List;
@CommandInfo(
name = "playerlist",
pattern = "player.*|listp.*",
pattern = "players|playerlist|player-list",
usage = "/ma players (<arena>)",
desc = "lists players in an arena",
permission = "mobarena.use.playerlist"