forked from JorelAli/CommandAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Pull upstream #1
Open
469512345
wants to merge
1,796
commits into
469512345:dev/tooltips
Choose a base branch
from
JorelAli:master
base: dev/tooltips
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
- Make all previously failing tests succeed - Merge tests for registering before and after server enables using `@ParameterizedTest` - Update test method names to match other test classes - Add assertions that thoroughly inspect the Brigadier `CommandDispatcher` and Bukkit `CommandMap` - Add TODO mentioning additional tests Also, removed unnecessary diff in `CommandRegistrationTests`
This adds tests for CommandTrees and adds an initial try of tests for conflicting command names but different namespaces. While the tests for the CommandTrees work with namespaces, the other one currently doesn't and is disabled.
Tests are still failing though and I have no idea why. In-game tests, however, seem to confirm that everything works. I am not sure how to continue.
Co-authored-by: willkroboth <[email protected]>
Co-authored-by: willkroboth <[email protected]>
Also adds a regex to only allow lowercase letters, numbers, underscores, hyphens and periods as per https://minecraft.wiki/w/Resource_location#Java_Edition
Part of #509 Expanded namespace+permissions tests Fixed bug where `fixPermissions` would not do anything. This happened because the `registeredPermissions` map refers to commands with their namespace, while the `registeredCommandMap` refers to commands without their namespace. So, `fixPermissions` thought all the commands were aliases and skipped everything. The fix I did removed the `registeredCommandMap` #509 (comment). Instead, all command name and permissions are kept track of in the `registeredPermissions` map. I also made some changes to the test setup, so the mocked `CraftPlayer` returned by `enableWithNamespaces` worked properly with setting and updating permissions. Note the test is not yet fully working. There is one assertion that still fails if commands are registered after the server enables. I think `CommandAPIBukkit#postCommandRegistration` is still doing something incorrect, as discussed on the CommandAPI discord https://discord.com/channels/745416925924032523/745419648970784821/1192439010132496474.
… minecraft namespace This makes all the tests work as expected When VanillaCommandWrappers are executed, they defer to the Brigadier dispatcher using their name. This was causing problems with permissions and conflicts when the minecraft namespace was involved. In certain cases, CommandMap commands were referencing different commands in the Brigadier dispatcher. The changes here fix all that so CommandMap commands are always referencing the correct node in the Brigadier dispatcher.
Add support for custom namespaces for commands
Co-authored-by: willkroboth <[email protected]>
…eption Made NullCommandSender not throw an exception on Paper
Copied from the documentation for more visibility https://commandapi.jorel.dev/9.5.0/argument_entities.html#player-argument
Fixed a grammatical mistake in arguments.md at line 20 in the second sentence. More specifically there was a duplicate 'is' word.
Fix grammatical mistake
* Fix Folia implementation * oops
Release/9.5.2
Update latest.html
Update latest.html with link to 9.5.2 (again)
Release/9.5.3
Update latest.html
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.