Repository navigation
Add config option for new username join messages - #4290
Conversation
JRoy
left a comment
There was a problem hiding this comment.
custom-new-username-message should rely on custom-join-message being set as well. Otherwise we end up with weird behavior when we don't have a custom join message and we find out in delayedJoin that the user doesn't have a name change.
|
So don't modify the initial string at all, I guess? If they want to change it have them set the join message to "{USERNAME}{OLDUSERNAME} joined the game"? |
No no, keep the separate messages, but only do |
This fixes a bug in #4290 in which custom join messages would throw a NullPointerException if the user hasn't changed their username.
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
This fixes a bug in EssentialsX#4290 in which custom join messages would throw a NullPointerException if the user hasn't changed their username.
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
This fixes a bug in EssentialsX#4290 in which custom join messages would throw a NullPointerException if the user hasn't changed their username.
Information
This PR closes #2716.
Details
Proposed feature:
As proposed in the aforementioned issue, this PR implements support for prior username checking.
This only shows when the stored last username differs from what the user joined with. I.e., it will only show when they join for the first time after a name change assuming they have joined before.
This feature isn't enabled by default and must be configured to work properly.
Environments tested:
Tested via
./gradlew EssentialsX:runServerOS: Mac OS X 10.16 (x86_64) aka macOS Big Sur
Java version: Java 15 (OpenJDK 64-Bit Server VM 15.0.1+9-18)
Demonstration:
(Assuming new username each time)
Modified
custom-join-message:Final thoughts
We never appear to have modified the join message ever, so doing it feels a bit weird. Worst case we only change it for custom join messages. Does this feel like the best way to handle it?