Skip to content

Add /mail clear <player> and /mail clearall commands - #4878

Merged
JRoy merged 22 commits into
EssentialsX:2.xfrom
Division7:2.x
Aug 8, 2023
Merged

Add /mail clear <player> and /mail clearall commands#4878
JRoy merged 22 commits into
EssentialsX:2.xfrom
Division7:2.x

Conversation

@Division7

Copy link
Copy Markdown
Contributor

Information

This PR closes#2057.

Details

Proposed feature:

/mail clear [player] and /mail clearall. Functions on online and offline players, and clears their mailboxes. Adds permissions essentials.mail.clear.others and essentials.mail.clearall.

Note; please look closely at my code. This is one of my first times working on a GitHub project, so I want to be sure I'm not breaking anything and that I'm doing it right.

Environments tested:

OS: Windows 11

Java version: Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)

  • Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • CraftBukkit/Spigot/Paper 1.18.2
  • CraftBukkit 1.8.8

Demonstration:

Before /mail clearall:
2022-04-01_19 05 58

After /mail clearall:
2022-04-01_19 06 15

Before /mail clear [player]:
2022-04-01_19 06 34

After /mail clear [player]:
2022-04-01_19 06 47

@pop4959pop4959 added type: enhancement Features and feature requests. module: main Issues or PRs for the main Essentials module labels May 21, 2022
@Division7

Copy link
Copy Markdown
ContributorAuthor

I'm sorry, I'm still kind of new to GitHub. Is there something I need to do to get this approved?

@mdcfe

Copy link
Copy Markdown
Member

I'm sorry, I'm still kind of new to GitHub. Is there something I need to do to get this approved?

We haven't had the time to review this PR yet. Once the 1.19 update is finished, we'll start reviewing PRs that add new features.

mdcfe
mdcfe previously requested changes Aug 16, 2022
Comment threadEssentials/src/main/java/com/earth2me/essentials/commands/Commandmail.java Outdated
Comment threadEssentials/src/main/java/com/earth2me/essentials/commands/Commandmail.java Outdated
Comment threadEssentials/src/main/resources/messages_en.properties Outdated
Comment threadEssentials/src/main/resources/messages.properties Outdated
@mdcfemdcfe added this to the 2.20.0 milestone Aug 16, 2022
new clearMail function returns user used on to make it easier to send the return message back to the correct source.
@Division7

Copy link
Copy Markdown
ContributorAuthor

Alright, I believe I did what you asked. To make it easier to display the user the clear command was used on, I set the clearMail() command to return that User object so I can include their name in the message.

@Division7

Copy link
Copy Markdown
ContributorAuthor

Thought I'd give this a poke. Not sure if I have to do anything from here.

@JRoyJRoy modified the milestones: 2.20.0, 2.21.0Apr 28, 2023
JRoy
JRoy approved these changes Aug 8, 2023
@JRoyJRoy changed the title PR Closing #2057 - mail clearall and mail clear [player]Add /mail clear <player> and /mail clearall commandsAug 8, 2023
@JRoy
JRoy enabled auto-merge (squash) August 8, 2023 18:01
@JRoy
JRoy merged commit 409af5d into EssentialsX:2.xAug 8, 2023
Starmism pushed a commit to valence-smp/Essentials that referenced this pull request Jan 8, 2025
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
rewsdjad1 pushed a commit to rewsdjad1/EssentialsXPlus that referenced this pull request Aug 13, 2026
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: mainIssues or PRs for the main Essentials moduletype: enhancementFeatures and feature requests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add /mail clearall /mail clear <user>

4 participants

@Division7@mdcfe@JRoy@pop4959