Fix parties mute bypass
This commit is contained in:
parent
1ff05eb3ff
commit
66af3cc450
@ -24,6 +24,7 @@ import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.menu.Menu;
|
||||
import mineplex.core.message.MessageManager;
|
||||
import mineplex.core.party.command.PartyCommand;
|
||||
import mineplex.core.party.constants.PartyRemoveReason;
|
||||
import mineplex.core.party.manager.PartyInviteManager;
|
||||
@ -60,6 +61,8 @@ public class PartyManager extends MiniPlugin
|
||||
private final PartyInviteManager _inviteManager;
|
||||
private final PartyJoinManager _joinManager;
|
||||
|
||||
private final MessageManager _messageManager;
|
||||
|
||||
/**
|
||||
* This local instance's name
|
||||
*/
|
||||
@ -92,6 +95,7 @@ public class PartyManager extends MiniPlugin
|
||||
|
||||
_region = !new File("eu.dat").exists() ? Region.US : Region.EU;
|
||||
|
||||
_messageManager = require(MessageManager.class);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@ -315,16 +319,19 @@ public class PartyManager extends MiniPlugin
|
||||
|
||||
if (!party.getOwnerName().equalsIgnoreCase(caller.getName()))
|
||||
{
|
||||
party.sendMessage(F.main("Party", F.elem(caller.getName()) + " has suggested " + F.elem(target) + " be invited"));
|
||||
party.getOwnerAsPlayer().ifPresent(owner ->
|
||||
if (!_messageManager.isMuted(caller))
|
||||
{
|
||||
ChildJsonMessage message = new ChildJsonMessage("").extra(F.main("Party", "Click "));
|
||||
message.add(F.link("Invite " + target))
|
||||
.hover(HoverEvent.SHOW_TEXT, C.cGreen + "Clicking this will invite " + C.cYellow + target + C.cGreen + " to the party")
|
||||
.click(ClickEvent.RUN_COMMAND, "/party gui invite " + target);
|
||||
message.add(C.mBody + " to invite them");
|
||||
message.sendToPlayer(owner);
|
||||
});
|
||||
party.sendMessage(F.main("Party", F.elem(caller.getName()) + " has suggested " + F.elem(target) + " be invited"));
|
||||
party.getOwnerAsPlayer().ifPresent(owner ->
|
||||
{
|
||||
ChildJsonMessage message = new ChildJsonMessage("").extra(F.main("Party", "Click "));
|
||||
message.add(F.link("Invite " + target))
|
||||
.hover(HoverEvent.SHOW_TEXT, C.cGreen + "Clicking this will invite " + C.cYellow + target + C.cGreen + " to the party")
|
||||
.click(ClickEvent.RUN_COMMAND, "/party gui invite " + target);
|
||||
message.add(C.mBody + " to invite them");
|
||||
message.sendToPlayer(owner);
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (party.getMembers().size() >= party.getSize())
|
||||
|
Loading…
Reference in New Issue
Block a user