mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Add missing docs for ChannelMessage
This commit is contained in:
1 parent
545d09c574
commit
cbcd145360
2 files changed
+12
-5
No files matched your search
@@ -155,7 +155,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
|||||||
void selectedChannel(final @Nullable ChatChannel chatChannel);
|
void selectedChannel(final @Nullable ChatChannel chatChannel);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines which channel the message should go to, and removes any channel prefixes from the message
|
* Determines which channel the message should go to, and removes any channel prefixes from the message.
|
||||||
*
|
*
|
||||||
* @param message the message to be sent
|
* @param message the message to be sent
|
||||||
* @return the channel and message
|
* @return the channel and message
|
||||||
@@ -163,6 +163,13 @@ public interface CarbonPlayer extends Audience, Identified {
|
|||||||
*/
|
*/
|
||||||
ChannelMessage channelForMessage(final Component message);
|
ChannelMessage channelForMessage(final Component message);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A message and which channel it should be sent in.
|
||||||
|
*
|
||||||
|
* @param message The channel message without any prefixes
|
||||||
|
* @param channel The channel the message should be sent to
|
||||||
|
* @since 2.1.0
|
||||||
|
*/
|
||||||
record ChannelMessage(Component message, @Nullable ChatChannel channel) {}
|
record ChannelMessage(Component message, @Nullable ChatChannel channel) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -98,10 +98,10 @@ public class WhisperCommand extends CarbonCommand {
|
|||||||
final String message = handler.get("message");
|
final String message = handler.get("message");
|
||||||
final CarbonPlayer recipient = handler.get("player");
|
final CarbonPlayer recipient = handler.get("player");
|
||||||
|
|
||||||
// if (sender.equals(recipient)) {
|
if (sender.equals(recipient)) {
|
||||||
// this.carbonMessages.whisperSelfError(sender, CarbonPlayer.renderName(sender));
|
this.carbonMessages.whisperSelfError(sender, CarbonPlayer.renderName(sender));
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (!recipient.online() || !sender.awareOf(recipient) && !sender.hasPermission("carbon.whisper.vanished")) {
|
if (!recipient.online() || !sender.awareOf(recipient) && !sender.hasPermission("carbon.whisper.vanished")) {
|
||||||
final var rawNameInput = CloudUtils.rawInputByMatchingName(handler.getRawInput(), recipient);
|
final var rawNameInput = CloudUtils.rawInputByMatchingName(handler.getRawInput(), recipient);
|
||||||
|
|||||||
Reference in new issue
Block a user