mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
fix: render_for and recipient_uuid not working
This commit is contained in:
1 parent
641f634532
commit
b3ba0dcfd6
3 files changed
+8
-6
No files matched your search
@@ -222,7 +222,7 @@ public final class WhisperCommand extends CarbonCommand {
|
||||
message.sendMessage(
|
||||
sender,
|
||||
ChatType.chatType(this.rawChatKey),
|
||||
this.messages.whisperSender(SourcedAudience.of(sender, sender), senderUsername, senderDisplayName, recipientUsername, recipientDisplayName, privateChatEvent.message())
|
||||
this.messages.whisperSender(SourcedAudience.of(sender, sender), senderUsername, senderDisplayName, recipientUsername, recipientDisplayName, recipient.uuid(), privateChatEvent.message())
|
||||
);
|
||||
if (localRecipient) {
|
||||
if (!recipient.hasPermission("carbon.whisper.receive")) {
|
||||
@@ -233,7 +233,7 @@ public final class WhisperCommand extends CarbonCommand {
|
||||
message.sendMessage(
|
||||
recipient,
|
||||
ChatType.chatType(this.rawChatKey),
|
||||
this.messages.whisperRecipient(SourcedAudience.of(sender, recipient), senderUsername, senderDisplayName, recipientUsername, recipientDisplayName, privateChatEvent.message())
|
||||
this.messages.whisperRecipient(SourcedAudience.of(sender, recipient), senderUsername, senderDisplayName, recipientUsername, recipientDisplayName, recipient.uuid(), privateChatEvent.message())
|
||||
);
|
||||
}
|
||||
WhisperCommand.broadcastWhisperSpy(this.server, this.messages, senderUsername, senderDisplayName,
|
||||
@@ -276,7 +276,7 @@ public final class WhisperCommand extends CarbonCommand {
|
||||
|
||||
recipient.whisperReplyTarget(sender.uuid());
|
||||
SourcedAudience.of(sender, recipient).sendMessage(
|
||||
this.messages.whisperRecipient(SourcedAudience.of(sender, recipient), senderUsername, senderDisplayName, recipientUsername, recipientDisplayName, packet.message())
|
||||
this.messages.whisperRecipient(SourcedAudience.of(sender, recipient), senderUsername, senderDisplayName, recipientUsername, recipientDisplayName, recipient.uuid(), packet.message())
|
||||
);
|
||||
WhisperCommand.broadcastWhisperSpy(this.server, this.messages, senderUsername, senderDisplayName, recipientUsername, recipientDisplayName, packet.message());
|
||||
this.messages.whisperConsoleLog(this.server.console(), senderUsername, senderDisplayName, recipientUsername, recipientDisplayName, packet.message());
|
||||
|
||||
@@ -141,6 +141,7 @@ public interface CarbonMessages {
|
||||
Component senderDisplayName,
|
||||
String recipientUsername,
|
||||
Component recipientDisplayName,
|
||||
UUID recipientUuid,
|
||||
Component message
|
||||
);
|
||||
|
||||
@@ -151,6 +152,7 @@ public interface CarbonMessages {
|
||||
Component senderDisplayName,
|
||||
String recipientUsername,
|
||||
Component recipientDisplayName,
|
||||
UUID recipientUuid,
|
||||
Component message
|
||||
);
|
||||
|
||||
|
||||
@@ -100,14 +100,14 @@ public final class RenderForTagResolver implements TagResolver {
|
||||
final String value = arguments.popOr("Missing message value").value();
|
||||
if (value.equalsIgnoreCase("inserting")) {
|
||||
return Tag.inserting(
|
||||
this.messageRenderer.get().render(player, arguments.popOr("Missing message value").value(), this.resolvedPlaceholders, null, null)
|
||||
this.messageRenderer.get().render(SourcedAudience.of(player, player), arguments.popOr("Missing message value").value(), this.resolvedPlaceholders, null, null)
|
||||
);
|
||||
} else if (value.equalsIgnoreCase("self_closing_inserting")) {
|
||||
return Tag.selfClosingInserting(
|
||||
this.messageRenderer.get().render(player, arguments.popOr("Missing message value").value(), this.resolvedPlaceholders, null, null)
|
||||
this.messageRenderer.get().render(SourcedAudience.of(player, player), arguments.popOr("Missing message value").value(), this.resolvedPlaceholders, null, null)
|
||||
);
|
||||
} else {
|
||||
return Tag.selfClosingInserting(this.messageRenderer.get().render(player, value, this.resolvedPlaceholders, null, null));
|
||||
return Tag.selfClosingInserting(this.messageRenderer.get().render(SourcedAudience.of(player, player), value, this.resolvedPlaceholders, null, null));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user