mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 22:15:45 +00:00
Add message on whisper channel
This commit is contained in:
1 parent
227a85e567
commit
4bf963e63e
2 files changed
+13
No files matched your search
@@ -61,6 +61,10 @@ public class WhisperOptions {
|
|||||||
@Comment("")
|
@Comment("")
|
||||||
private String consoleFormat = "<gold>[<white><sender> <gray>-> <white><receiver><gold>] <message>";
|
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
|
@Setting
|
||||||
@Comment("")
|
@Comment("")
|
||||||
private boolean logToConsole = true;
|
private boolean logToConsole = true;
|
||||||
@@ -121,4 +125,8 @@ public class WhisperOptions {
|
|||||||
return this.cannotUseMessage;
|
return this.cannotUseMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public @Nullable String nowWhisperingPlayer() {
|
||||||
|
return this.nowWhisperingPlayer;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -56,6 +56,11 @@ public class MessageCommand {
|
|||||||
receiver.sendMessage(sender, message.get());
|
receiver.sendMessage(sender, message.get());
|
||||||
} else {
|
} else {
|
||||||
sender.selectedChannel(new CarbonWhisperChannel(sender, receiver));
|
sender.selectedChannel(new CarbonWhisperChannel(sender, receiver));
|
||||||
|
|
||||||
|
sender.sendMessage(this.carbonChat.messageProcessor().processMessage(
|
||||||
|
this.carbonChat.carbonSettings().whisperOptions().nowWhisperingPlayer(),
|
||||||
|
"player", receiver.name()
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user