mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
[Bleeding] Plugin aliases should have higher priority than fallbacks. Fixes BUKKIT-5442
By: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
parent
de55549866
commit
71ae039e05
1 changed files with 3 additions and 2 deletions
|
@ -131,8 +131,9 @@ public class SimpleCommandMap implements CommandMap {
|
|||
* @return true if command was registered, false otherwise.
|
||||
*/
|
||||
private synchronized boolean register(String label, Command command, boolean isAlias) {
|
||||
if (isAlias && knownCommands.containsKey(label)) {
|
||||
// Request is for an alias and it conflicts with a existing command or previous alias ignore it
|
||||
if ((command instanceof VanillaCommand || isAlias) && knownCommands.containsKey(label)) {
|
||||
// Request is for an alias/fallback command and it conflicts with
|
||||
// a existing command or previous alias ignore it
|
||||
// Note: This will mean it gets removed from the commands list of active aliases
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue