Add message on whisper channel

This commit is contained in:
Draycia committed 2020-10-03 03:06:01 -07:00
1 parent 227a85e567
commit 4bf963e63e
2 files changed
+13

No files matched your search

@@ -61,6 +61,10 @@ public class WhisperOptions {
@Comment("")
private String consoleFormat = "<gold>[<white><sender> <gray>-> <white><receiver><gold>] <message>";
@Setting
@Comment("")
private String nowWhisperingPlayer = "<white>You are now whispering <green><player><white>!";
@Setting
@Comment("")
private boolean logToConsole = true;
@@ -121,4 +125,8 @@ public class WhisperOptions {
return this.cannotUseMessage;
}
public @Nullable String nowWhisperingPlayer() {
return this.nowWhisperingPlayer;
}
}
@@ -56,6 +56,11 @@ public class MessageCommand {
receiver.sendMessage(sender, message.get());
} else {
sender.selectedChannel(new CarbonWhisperChannel(sender, receiver));
sender.sendMessage(this.carbonChat.messageProcessor().processMessage(
this.carbonChat.carbonSettings().whisperOptions().nowWhisperingPlayer(),
"player", receiver.name()
));
}
}