Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aliases registered with the Brigadier Command API do not have priority over vanilla commands. #11035

Closed
NamiUni opened this issue Jul 7, 2024 · 8 comments · Fixed by #11186
Closed
Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. type: bug Something doesn't work as it was intended to. version: 1.21 Game version 1.21

Comments

@NamiUni
Copy link

NamiUni commented Jul 7, 2024

Expected behavior

Aliases should take precedence over vanilla commands for commands executed by the player or console.

Observed/Actual behavior

Commands executed by the player or console are executed with vanilla commands taking precedence over aliases.

Steps/models to reproduce

public final class PaperPluginExample extends JavaPlugin {
    @Override
    public void onEnable() {
        getLifecycleManager().registerEventHandler(LifecycleEvents.COMMANDS, event -> {
            final var command = Commands.literal("msg")
                    .executes(context -> {
                        context.getSource().getSender().sendMessage("test");
                        return Command.SINGLE_SUCCESS;
                    }).build();
            event.registrar().register(command, List.of("tell", "w"));
        });
    }
}

Plugin and Datapack List

[01:26:28 INFO]: Server Plugins (2):
[01:26:28 INFO]: Paper Plugins:
[01:26:28 INFO]: - PaperPluginExample
[01:26:28 INFO]: Bukkit Plugins:
[01:26:28 INFO]: - LuckPerms

Paper version

[01:27:06 INFO]: This server is running Paper version 1.21-46-master@2fa5e0e (2024-07-06T21:32:48Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21-44-8d91b85 (MC: 1.21)

Other

image

log
https://pastes.dev/w0RfWFOgUN

This bug occurs even if the command is registered during bootstrapping.
Also, this bug does not occur with BukkitCommandAPI.
#11011 may have something to do with it.

@NamiUni NamiUni added status: needs triage type: bug Something doesn't work as it was intended to. labels Jul 7, 2024
@papermc-sniffer papermc-sniffer bot added the version: 1.21 Game version 1.21 label Jul 7, 2024
@papermc-projects papermc-projects bot moved this to 🕑 Needs Triage in Issues: Bugs Jul 7, 2024
@quiquelhappy
Copy link

we are having issues with this too. it is very annoying.

@Emibergo02
Copy link

Me too

@TheosisOfficial
Copy link

Also experiencing this, would be great to have fixed soon!

@NamiUni
Copy link
Author

NamiUni commented Jul 25, 2024

Since it may be challenging to identify or fix the cause of the issue, please try not to put too much pressure on the developers. Thank you for your understanding. :)

@Folas1337
Copy link

Since it may be challenging to identify or fix the cause of the issue, please try not to put too much pressure on the developers. Thank you for your understanding. :)

While I strongly agree with this point, I also think we should still show how much of an impact this is really having by respectfully stating that we're affected by it.

Definitely do not pressure the lovely devs who make this awesome software who should be praised for it BUT still respectfully say you're affected and would like to see this fixed. At least that's my opinion and I just wanted to share it :)

@Technofied
Copy link

We're experiencing this issue too. :(

@Malfrador Malfrador added status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. and removed status: needs triage labels Jul 28, 2024
@papermc-projects papermc-projects bot moved this from 🕑 Needs Triage to ✅ Accepted in Issues: Bugs Jul 28, 2024
@jpenilla
Copy link
Member

Please test the build linked in PR #11186

@Folas1337
Copy link

I tested it with Carbon and it seems to be working fine :)
From my point of view, who was originally the one complaining and @NamiUni was the one who reproduced it and then reported it here, this is looking good but we can also get Nami to verify with the thing they created to be absolutely sure and then hopefully get this merged soon(ish) :)

@github-project-automation github-project-automation bot moved this from ✅ Accepted to Done in Issues: Bugs Jul 30, 2024
kokiriglade pushed a commit to kokiriglade/Paper that referenced this issue Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. type: bug Something doesn't work as it was intended to. version: 1.21 Game version 1.21
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

8 participants