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

Add piglin bartering event #6768

Merged
merged 42 commits into from
Aug 30, 2024
Merged

Add piglin bartering event #6768

merged 42 commits into from
Aug 30, 2024

Conversation

Efnilite
Copy link
Member

@Efnilite Efnilite commented Jun 6, 2024

Description

Adds support for the PiglinBarterEvent and adds the barter input and barter output expressions.


Target Minecraft Versions: 1.16.5+ (event was added in Spigot 1.16.5)
Requirements: none
Related Issues: none

@Moderocky Moderocky changed the base branch from master to dev/feature June 6, 2024 16:02
@Moderocky Moderocky added feature Pull request adding a new feature. 2.9 Targeting a 2.9.X version release labels Jun 6, 2024
src/main/java/ch/njol/skript/events/SimpleEvents.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/events/SimpleEvents.java Outdated Show resolved Hide resolved
Copy link
Member

@sovdeeth sovdeeth left a comment

Choose a reason for hiding this comment

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

just some minor formatting

Copy link
Member

@sovdeeth sovdeeth left a comment

Choose a reason for hiding this comment

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

Looks good, the only thing missing is some tests! This would need JUnit tests, so if you're not comfortable with adding those, please let me know and I can add some for you.

@Efnilite
Copy link
Member Author

Efnilite commented Jun 6, 2024

Looks good, the only thing missing is some tests! This would need JUnit tests, so if you're not comfortable with adding those, please let me know and I can add some for you.

thanks for the offer :) idm trying myself though. do you mean this? if not, where can i find the appropriate format or example?

@sovdeeth
Copy link
Member

sovdeeth commented Jun 6, 2024

Looks good, the only thing missing is some tests! This would need JUnit tests, so if you're not comfortable with adding those, please let me know and I can add some for you.

thanks for the offer :) idm trying myself though. do you mean this? if not, where can i find the appropriate format or example?

Yup, the tests in that folder as well as this package are what you want to look at

@Efnilite
Copy link
Member Author

Efnilite commented Jun 8, 2024

Looks good, the only thing missing is some tests! This would need JUnit tests, so if you're not comfortable with adding those, please let me know and I can add some for you.

thanks for the offer :) idm trying myself though. do you mean this? if not, where can i find the appropriate format or example?

Yup, the tests in that folder as well as this package are what you want to look at

I'm not so sure on how to fix the current error that occurs in <1.16.5 versions, should I use reflection or is there a better and prefered way? It should be visible in the

@sovdeeth
Copy link
Member

sovdeeth commented Jun 8, 2024

Your expressions aren't gated behind class exists checks

@Efnilite
Copy link
Member Author

Efnilite commented Jun 8, 2024

Your expressions aren't gated behind class exists checks

which expressions in which file do you mean? in the java file i have this rn

Copy link
Member

@sovdeeth sovdeeth left a comment

Choose a reason for hiding this comment

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

looks good, though you should ensure your files end with a new line! (see the red do-not-enter-y mark on github's diffs)

@sovdeeth sovdeeth added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Jul 1, 2024
@APickledWalrus APickledWalrus removed feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. 2.9 Targeting a 2.9.X version release labels Jul 2, 2024
Efnilite and others added 2 commits July 3, 2024 17:03
Co-authored-by: Patrick Miller <[email protected]>
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

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

Great work! A few minor formatting suggestions that can be applied to all syntax files

@sovdeeth sovdeeth added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Jul 18, 2024
@TheLimeGlass
Copy link
Collaborator

You can use EventValueExpression to specify that it's exclusively from an event

@Moderocky Moderocky merged commit de1a529 into SkriptLang:dev/feature Aug 30, 2024
3 checks passed
@Efnilite Efnilite deleted the barter branch September 23, 2024 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Pull request adding a new feature. feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants