-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
ExprPrefixSuffix Cleanup #6970
ExprPrefixSuffix Cleanup #6970
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should fix the method ordering while you're here, as well as switch to Jetbrains @nullable, remove finals from method params, and rename variables to reasonable names,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could add some tests
src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java
Outdated
Show resolved
Hide resolved
not sure how I do that for this, sorry 😬 |
https://github.com/SkriptLang/Skript/blob/master/src/test/skript/README.md |
I think what he means is how would he do tests for this expression exactly |
You would use JUnit and EasyMock, and mock the Player.class to create a fake player. See ExprMessageTest for an example. This change request can be void for this pull request due to the fact that the test environments don't run the Vault plugin. |
src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java
Outdated
Show resolved
Hide resolved
src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java
Outdated
Show resolved
Hide resolved
…Suffix.java Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
…Suffix.java Co-authored-by: _tud <98935832+UnderscoreTud@users.noreply.github.com>
Description
I've cleaned up some bits in ExprPrefixSuffix, by adding a CompleteableFuture.runAsync, similar to ExprGroup, to prevent any possible stack traces from LuckPerms, i've also added a reset/delete changer.
Target Minecraft Versions: any
Requirements: none
Related Issues: none