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

Rework Mail System #3710

Merged
merged 18 commits into from Jul 1, 2021
Merged

Rework Mail System #3710

merged 18 commits into from Jul 1, 2021

Conversation

JRoy
Copy link
Member

@JRoy JRoy commented Oct 5, 2020

  1. New /mail sendtemp <time diff> <message> command to send mail that will self-destruct after time diff.
  2. New /mail clear <number> command to clear a specific mail item.
  3. /mail read now tracks which mails you read and won't nag you about them.
  4. A bunch of other flexibility since we store actual data instead of strings
No longer relavant json format since new format will serialize to YAML using configurate object mappers

Mail Schema:

{
  "mail": [
    {
      "read": false, //bool which if true will show the mail item as gray italic to the user when read otherwise white
      "sender": "JRoy", //String because fetching User objects sounds like a bad idea
      "uuid": "abcde-abcd-acd12-12334", // Not currently used but stored for possible future use of for a server admin's reference
      "timestamp": 1234567890, //Epoch allows timestamp format to be changed (or per-player timezones in the future)
      "expire": 1234567890, //Epoch at which this mail should be deleted and not shown to the user or 0 if it does not expire
      "message": "Cool message, yo" //Actual message, possibly with color codes
    },
    {
      "read": false, //bool which if true will show the mail item as gray italic to the user when read otherwise white
      "legacy": true, //bool but Value of this doesn't matter as it just instructs the parser to not expect the other *unknown* values
      "message": "JRoy: this is a message that was sent before fancy system" //Actual message
    }
  ]
}

Closes #364
Closes #1527
Closes #1860
Closes #3097

@JRoy JRoy added type: enhancement Features and feature requests. hacktoberfest-accepted labels Oct 5, 2020
@JRoy JRoy added this to the 2.18.2 milestone Oct 5, 2020
@JRoy JRoy modified the milestones: 2.18.2, 2.19.0 Nov 9, 2020
@JRoy JRoy force-pushed the feature/mail-revamp branch 2 times, most recently from 86c3914 to fe1fef9 Compare November 25, 2020 21:47
@JRoy JRoy added the type: api Issue/Pull Request regards user-facing API label Jan 27, 2021
@JRoy JRoy requested a review from mdcfe February 5, 2021 20:42
@mdcfe mdcfe self-assigned this Mar 6, 2021
@JRoy
Copy link
Member Author

JRoy commented May 10, 2021

Moving to draft as this is pending #4072 being merged

@JRoy JRoy marked this pull request as draft May 10, 2021 20:49
@JRoy JRoy marked this pull request as ready for review June 9, 2021 15:58
JRoy added 3 commits June 9, 2021 17:36
# Conflicts:
#	Essentials/src/main/java/com/earth2me/essentials/UserData.java
#	Essentials/src/main/java/com/earth2me/essentials/config/holders/UserConfigHolder.java
thanks zml :))
@JRoy JRoy added the module: main Issues or PRs for the main Essentials module label Jun 17, 2021
@JRoy JRoy requested a review from mdcfe June 29, 2021 22:03
@JRoy JRoy requested a review from mdcfe July 1, 2021 14:03
@JRoy JRoy changed the title Mail System Revamp Rework Mail System Jul 1, 2021
@JRoy JRoy merged commit 9c45127 into EssentialsX:2.x Jul 1, 2021
@JRoy JRoy deleted the feature/mail-revamp branch July 1, 2021 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: main Issues or PRs for the main Essentials module type: api Issue/Pull Request regards user-facing API type: enhancement Features and feature requests.
Projects
None yet
6 participants