mirror of
https://github.com/lukasabbe/VoiceChatGroupMsg.git
synced 2026-04-30 10:50:53 +00:00
Fixed so Incoming and outgoing messages are using team commands message type
This commit is contained in:
@@ -40,10 +40,10 @@ public class Commands {
|
||||
Group group = VoiceChatGroupMsg.getPlayerGroup(player);
|
||||
List<ServerPlayerEntity> players = VoiceChatGroupMsg.GroupPlayers(group.getId(), source.getWorld());
|
||||
MessageArgumentType.getSignedMessage(ctx, "message", signedMessage -> {
|
||||
player.sendChatMessage(SentMessage.of(signedMessage),true, MessageType.params(MessageType.MSG_COMMAND_OUTGOING,source).withTargetName(Text.of(group.getName())));
|
||||
player.sendChatMessage(SentMessage.of(signedMessage),true, MessageType.params(MessageType.TEAM_MSG_COMMAND_OUTGOING,source).withTargetName(Text.of(group.getName())));
|
||||
players.forEach(player1 -> {
|
||||
if(!player1.getUuid().equals(source.getPlayer().getUuid())){
|
||||
player1.sendChatMessage(SentMessage.of(signedMessage),true, MessageType.params(MessageType.MSG_COMMAND_INCOMING,source));
|
||||
player1.sendChatMessage(SentMessage.of(signedMessage),true, MessageType.params(MessageType.TEAM_MSG_COMMAND_INCOMING,source).withTargetName(Text.of(group.getName())));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user