-
-
Notifications
You must be signed in to change notification settings - Fork 995
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
Parse /pay modifiers more strictly #5638
Conversation
A two month wait on a large project with busy maintainers? That's nothing to complain about. |
This comment was marked as abuse.
This comment was marked as abuse.
Is there any specific reason you decided to close this? It looks like this fixes a valid issue. |
Well, the longevity of the pr being open. If my pr was still being considered, was overlooked, or any other reason, then I can re-open it. |
Sorry for the delays, most of us have been very busy recently and the bulk of our focus has been on the adventure update (and all of the fallout / bugs following from that, trying to get us into a better place to lean towards a release). We appreciate your dedication to keeping this up to date, although for the most part unless there are conflicts it should merge cleanly. If there are we'll generally let you know and/or do it ourselves before merging, so please don't worry too much about it especially until we find time to properly review this. Thanks for remaining patient. |
Thanks for the contribution :) |
EssentialsX@1778bf5 Respect per player locale for command descriptions (EssentialsX#5972) EssentialsX@2418a6f Improvements to Random Teleport (EssentialsX#4271) EssentialsX@38e42f9 Add argument to /skull to give skull to other player (EssentialsX#5822) EssentialsX@1af1565 Discord: Add start time placeholder for start message (EssentialsX#5686) EssentialsX@bea43e8 Fix mini message parsing in NumberUtil#displayCurrency (EssentialsX#5921) EssentialsX@3203e97 Parse /pay modifiers more strictly (EssentialsX#5638) EssentialsX@f02eeec Add method to get all linked players in DiscordLinkService (EssentialsX#5896) EssentialsX@9590d4c Add translation key for /alts output (EssentialsX#5595) EssentialsX@3f0a412 Add locale based comma support for /pay (EssentialsX#5962) EssentialsX@57c9edc Add optional requirements for balance top listing (EssentialsX#5394) EssentialsX@c7cc1b4 Fix respawn-at-anchor setting. (EssentialsX#5825) EssentialsX@2a41ea0 Add config options for specific chat type formats EssentialsX@b560bbd Fix actions permissions on PRs for junit reports EssentialsX@d31ff55 Remove extraneous code in command preprocess event handling EssentialsX@bc8aa76 Revert removal of InvalidWorldException (EssentialsX#5984) EssentialsX@d58db0d Update to 1.21.4 EssentialsX@c37064f Add 1.21.4 Mobs EssentialsX@baa8258 Add 1.21.4 Tree Types EssentialsX@424816e Add 1.21.4 Items
Co-authored-by: Josh Roy <[email protected]>
Information
This PR fixes #5495.
Details
Proposed fix:
This PR fixes half of the issue presented.
It is also more simplistic and a much better approach compared to my previous PR
Instead of checking for the last character in the string ->
Character.toLowerCase(ogStr.charAt(ogStr.length() - 1))
,check for the exact modified being use via removing the amount from the string ->
ogStr.replace(sanitizedString, "")
If the result of
ogStr.replace(sanitizedString, "")
is not exactly one of the modifiers, throw an exception (unless an empty string is returned due to a modifier not being present).Environments tested:
OS: Linux 5.15.0-79-generic
Java version: java 19.0.1
Demonstration: