mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-03-02 11:11:58 +01:00
Fix duplicated messages with /helpop (#5776)
This commit is contained in:
parent
549283a1e5
commit
cde7184da3
@ -51,7 +51,10 @@ public class Commandhelpop extends EssentialsCommand {
|
|||||||
final HelpopMessageSendEvent sendEvent = new HelpopMessageSendEvent(from, recipients, message);
|
final HelpopMessageSendEvent sendEvent = new HelpopMessageSendEvent(from, recipients, message);
|
||||||
ess.getServer().getPluginManager().callEvent(sendEvent);
|
ess.getServer().getPluginManager().callEvent(sendEvent);
|
||||||
|
|
||||||
from.sendTl("helpOp", from.getDisplayName(), message);
|
final IUser sender = (IUser) from;
|
||||||
|
if(!recipients.contains(sender)){
|
||||||
|
from.sendTl("helpOp", from.getDisplayName(), message);
|
||||||
|
}
|
||||||
|
|
||||||
for (IUser recipient : sendEvent.getRecipients()) {
|
for (IUser recipient : sendEvent.getRecipients()) {
|
||||||
recipient.sendTl("helpOp", from.getDisplayName(), message);
|
recipient.sendTl("helpOp", from.getDisplayName(), message);
|
||||||
|
Loading…
Reference in New Issue
Block a user