Skip to content

Commit

Permalink
Fix duplicated messages with /helpop (EssentialsX#5776)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evidentsinger14 authored Apr 30, 2024
1 parent 549283a commit cde7184
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ private void sendMessage(final IMessageRecipient from, final String[] args) thro
final HelpopMessageSendEvent sendEvent = new HelpopMessageSendEvent(from, recipients, message);
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()) {
recipient.sendTl("helpOp", from.getDisplayName(), message);
Expand Down

0 comments on commit cde7184

Please sign in to comment.