mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 03:35:51 -07:00
[Bleeding] Plugin aliases should have higher priority than fallbacks. Fixes BUKKIT-5442
By: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
@@ -131,8 +131,9 @@ public class SimpleCommandMap implements CommandMap {
|
|||||||
* @return true if command was registered, false otherwise.
|
* @return true if command was registered, false otherwise.
|
||||||
*/
|
*/
|
||||||
private synchronized boolean register(String label, Command command, boolean isAlias) {
|
private synchronized boolean register(String label, Command command, boolean isAlias) {
|
||||||
if (isAlias && knownCommands.containsKey(label)) {
|
if ((command instanceof VanillaCommand || isAlias) && knownCommands.containsKey(label)) {
|
||||||
// Request is for an alias and it conflicts with a existing command or previous alias ignore it
|
// 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
|
// Note: This will mean it gets removed from the commands list of active aliases
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user