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

Fix /mail sendall not working #5263

Merged
merged 2 commits into from
Apr 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

import net.ess3.api.IUser;
import net.essentialsx.api.v2.services.mail.MailMessage;
import org.bukkit.Bukkit;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

/**
* Called when mail is sent to a {@link net.ess3.api.IUser IUser} by another player or the console.
* <p>
* Note: This event has no guarantee of the thread it is fired on, please use {@link #isAsynchronous()}} to see if this event is off the main Bukkit thread.
*/
public class UserMailEvent extends Event implements Cancellable {
private static final HandlerList handlers = new HandlerList();
Expand All @@ -17,6 +20,7 @@ public class UserMailEvent extends Event implements Cancellable {
private boolean canceled;

public UserMailEvent(IUser recipient, MailMessage message) {
super(!Bukkit.isPrimaryThread());
this.recipient = recipient;
this.message = message;
}
Expand Down