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

PlayerExpCooldown #7076

Merged

Conversation

TheAbsolutionism
Copy link
Contributor

Description

This PR aims to add PlayerExpCooldownChangeEvent and correlating expression.


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

@Efnilite Efnilite added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Sep 13, 2024
@Efnilite
Copy link
Member

and tests please :)

Copy link
Member

@cheeezburga cheeezburga left a comment

Choose a reason for hiding this comment

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

Would love to see tests for the actual changing of the cooldown as well. Would help spot that pesky +

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
src/main/resources/lang/default.lang Outdated Show resolved Hide resolved
src/main/resources/lang/default.lang Outdated Show resolved Hide resolved
src/test/skript/junit/EvtExperienceCooldownChangeTest.sk Outdated Show resolved Hide resolved
src/test/skript/junit/EvtExperienceCooldownChangeTest.sk Outdated Show resolved Hide resolved
src/test/skript/junit/EvtExperienceCooldownChangeTest.sk Outdated Show resolved Hide resolved
Copy link
Member

@cheeezburga cheeezburga left a comment

Choose a reason for hiding this comment

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

Still would love to see tests for the expression!

@TheAbsolutionism
Copy link
Contributor Author

Still would love to see tests for the expression!

How do you propose I do the tests for the expression?

@Efnilite
Copy link
Member

Efnilite commented Sep 15, 2024

Still would love to see tests for the expression!

How do you propose I do the tests for the expression?

Something similar to this, https://github.com/Efnilite/Skript/blob/38d855925ad17b20923080155bc42d1704cad56a/src/test/skript/junit/-EvtPiglinBarter.sk, you just try all the change modes and see if it changed correctly

@TheAbsolutionism
Copy link
Contributor Author

So as expected, using the expressions on an EasyMock Player does not work and throws stack traces. Which I knew would happen from the get go and is why I didn't add it.

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 two little things!

@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 Sep 26, 2024
@sovdeeth sovdeeth merged commit 04afda1 into SkriptLang:dev/feature Oct 26, 2024
5 checks passed
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. 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