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

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

Merged
merged 22 commits into from
Aug 8, 2023

Conversation

Division7
Copy link
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

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

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
Member

mdcfe commented Jun 15, 2022

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 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 Division7 requested a review from mdcfe September 26, 2022 20:38
@Division7
Copy link
Contributor Author

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
Contributor Author

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

@JRoy JRoy modified the milestones: 2.20.0, 2.21.0 Apr 28, 2023
@JRoy JRoy changed the title PR Closing #2057 - mail clearall and mail clear [player] Add /mail clear <player> and /mail clearall commands Aug 8, 2023
@JRoy JRoy enabled auto-merge (squash) August 8, 2023 18:01
@JRoy JRoy merged commit 409af5d into EssentialsX:2.x Aug 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>
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: enhancement Features and feature requests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add /mail clearall /mail clear <user>
4 participants