An event that fires after a modified chat message is sent.

This is triggered by the chat ranks system of the add-on, if the chat ranks system is disabled this event will never fire.

Implements

Constructors

Properties

formatOptions: TagChatMessageFormat & {
    allowEval: boolean;
    dimension:
        | "overworld"
        | "nether"
        | "the_end"
        | "minecraft:overworld"
        | "minecraft:nether"
        | "minecraft:the_end";
    isPlaceholderPlayer?: boolean;
    player?: Player;
    playerPersonalSettings: {
        chatNameAndMessageSeparator?: string;
        chatRankPrefix?: string;
        defaultMessageFormatting?: string;
        defaultNameFormatting?: string;
        defaultSeparatorFormatting?: string;
        hideChatDisplayTimeStamp?: boolean;
        nameDisplayPrefix?: string;
        nameDisplaySuffix?: string;
        rankDisplayPrefix?: string;
        rankDisplaySeparator?: string;
        rankDisplaySuffix?: string;
    };
    ranks?: string[];
    tags?: string[];
    time?: number;
}

Type declaration

  • ReadonlyallowEval: boolean

    Whether eval was allowed.

    true
    
  • Readonlydimension:
        | "overworld"
        | "nether"
        | "the_end"
        | "minecraft:overworld"
        | "minecraft:nether"
        | "minecraft:the_end"

    The type ID of the dimension that the player was in.

  • Optional ReadonlyisPlaceholderPlayer?: boolean

    Whether the sender was a placeholder player.

  • Optional Readonlyplayer?: Player

    The sender.

  • ReadonlyplayerPersonalSettings: {
        chatNameAndMessageSeparator?: string;
        chatRankPrefix?: string;
        defaultMessageFormatting?: string;
        defaultNameFormatting?: string;
        defaultSeparatorFormatting?: string;
        hideChatDisplayTimeStamp?: boolean;
        nameDisplayPrefix?: string;
        nameDisplaySuffix?: string;
        rankDisplayPrefix?: string;
        rankDisplaySeparator?: string;
        rankDisplaySuffix?: string;
    }

    The personal settings for the player that were used.

    • Optional ReadonlychatNameAndMessageSeparator?: string

      The players default name and message separator that was used.

      If it was specified it was used instead of the global chat name and message separator.

    • Optional ReadonlychatRankPrefix?: string

      The players default chat rank prefix that was used.

      If it was specified it was used instead of the global chat rank prefix.

      undefined
      
    • Optional ReadonlydefaultMessageFormatting?: string

      The default message formatting for the player that was used.

      This was be used if no other message formatting was found.

      undefined
      
    • Optional ReadonlydefaultNameFormatting?: string

      The default name formatting for the player that was used.

      This was be used if no other message formatting was found.

      undefined
      
    • Optional ReadonlydefaultSeparatorFormatting?: string

      The default separator formatting for the player that was used.

      This was be used if no other message formatting was found.

      undefined
      
    • Optional ReadonlyhideChatDisplayTimeStamp?: boolean

      If it was set to true, the player's message time stamp was hidden.

    • Optional ReadonlynameDisplayPrefix?: string

      The players default name display prefix that was used.

      If it was specified it was used instead of the global chat name display prefix.

      undefined
      
    • Optional ReadonlynameDisplaySuffix?: string

      The players default name display suffix that was used.

      If it was specified it was used instead of the global chat name display suffix.

      undefined
      
    • Optional ReadonlyrankDisplayPrefix?: string

      The players default rank display prefix that was used.

      If it was specified it was used instead of the global chat rank display prefix.

      undefined
      
    • Optional ReadonlyrankDisplaySeparator?: string

      The players default rank display separator that was used.

      If it was specified it was used instead of the global chat rank display separator.

      undefined
      
    • Optional ReadonlyrankDisplaySuffix?: string

      The players default rank display suffix that was used.

      If it was specified it was used instead of the global chat rank display suffix.

      undefined
      
  • Optional Readonlyranks?: string[]

    The ranks that the player had.

  • Optional Readonlytags?: string[]

    The tags that the player had.

  • Optional Readonlytime?: number

    The time that the message was sent.

    This was used for the message time stamp.

The options that were used to format the message, see TagChatMessageFormat.

message: string

The fully modified chat message that was sent, including ranks, prefixes, etc.

The final message that was printed to the chat was exactly what this string was set to.

nameTag: {
    hidden: boolean;
    sourceType: "nameTag" | "name" | "hidden" | "sudo";
    value?: string;
}

Type declaration

  • Readonlyhidden: boolean

    Whether the name tag was hidden.

  • ReadonlysourceType: "nameTag" | "name" | "hidden" | "sudo"

    The type of the name tag that was used.

    hidden - The name tag was hidden.

    sudo - The name tag was from the player's sudo tag.

    nameTag - The name tag was the player's name tag.

    name - The name tag was the player's name.

  • Optional Readonlyvalue?: string

    The player's evaluated name tag string that was used.

The sender's evaluated name tag that was used.

originalMessage: string

The original chat message.

sender: Player

Player that sent the chat message.

targets?: Player[]

Optional list of players that will receive this message. If defined, this message is directly targeted to one or more players (i.e., is not broadcast.)

The evaluated message format token data that was used.