mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +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(
|
message.sendMessage(
|
||||||
sender,
|
sender,
|
||||||
ChatType.chatType(this.rawChatKey),
|
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 (localRecipient) {
|
||||||
if (!recipient.hasPermission("carbon.whisper.receive")) {
|
if (!recipient.hasPermission("carbon.whisper.receive")) {
|
||||||
@@ -233,7 +233,7 @@ public final class WhisperCommand extends CarbonCommand {
|
|||||||
message.sendMessage(
|
message.sendMessage(
|
||||||
recipient,
|
recipient,
|
||||||
ChatType.chatType(this.rawChatKey),
|
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,
|
WhisperCommand.broadcastWhisperSpy(this.server, this.messages, senderUsername, senderDisplayName,
|
||||||
@@ -276,7 +276,7 @@ public final class WhisperCommand extends CarbonCommand {
|
|||||||
|
|
||||||
recipient.whisperReplyTarget(sender.uuid());
|
recipient.whisperReplyTarget(sender.uuid());
|
||||||
SourcedAudience.of(sender, recipient).sendMessage(
|
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());
|
WhisperCommand.broadcastWhisperSpy(this.server, this.messages, senderUsername, senderDisplayName, recipientUsername, recipientDisplayName, packet.message());
|
||||||
this.messages.whisperConsoleLog(this.server.console(), 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,
|
Component senderDisplayName,
|
||||||
String recipientUsername,
|
String recipientUsername,
|
||||||
Component recipientDisplayName,
|
Component recipientDisplayName,
|
||||||
|
UUID recipientUuid,
|
||||||
Component message
|
Component message
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -151,6 +152,7 @@ public interface CarbonMessages {
|
|||||||
Component senderDisplayName,
|
Component senderDisplayName,
|
||||||
String recipientUsername,
|
String recipientUsername,
|
||||||
Component recipientDisplayName,
|
Component recipientDisplayName,
|
||||||
|
UUID recipientUuid,
|
||||||
Component message
|
Component message
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -100,14 +100,14 @@ public final class RenderForTagResolver implements TagResolver {
|
|||||||
final String value = arguments.popOr("Missing message value").value();
|
final String value = arguments.popOr("Missing message value").value();
|
||||||
if (value.equalsIgnoreCase("inserting")) {
|
if (value.equalsIgnoreCase("inserting")) {
|
||||||
return Tag.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")) {
|
} else if (value.equalsIgnoreCase("self_closing_inserting")) {
|
||||||
return Tag.selfClosingInserting(
|
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 {
|
} 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