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

Refined Event On Command and Condition CondIsSkriptCommand #6709

Open
wants to merge 7 commits into
base: dev/feature
Choose a base branch
from

Conversation

NotSoDelayed
Copy link
Contributor

Description

This PR refines the Skript event on command to allow specifying command executor in event.
The CondIsSkriptCommand is also refined to CondIsValidCommand to support plugin commands.


Target Minecraft Versions: any
Requirements: none
Related Issues: none

public class CondIsValidCommand extends PropertyCondition<String> {

static {
register(CondIsValidCommand.class, PropertyType.BE, "[a[n]] [[:in]valid] [skript:s(k|c)ript] (command|cmd)", "strings");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may have been better to keep the old syntax and just made a new one for validity, or to have done separate patterns here

The combinatorial doesn't really make sense (is an invalid skript command different from an invalid command ?) and I don't think you gain much benefit from doing both together.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the new invalid tag to have the users checking whether the provided command is valid, and I thought of fitting it for skript too to have users to check whether this skripted command is registered

src/main/java/ch/njol/skript/events/EvtCommand.java Outdated Show resolved Hide resolved
@sovdeeth sovdeeth added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants