mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-01 21:11:44 +01:00
Fix /mail sendall not working (#5263)
This commit is contained in:
parent
75481925f7
commit
11e6d3ca7b
@ -2,12 +2,15 @@ package net.essentialsx.api.v2.events;
|
||||
|
||||
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();
|
||||
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user