Skip to content

Messages ​

Description ​

Messages lets you configure welcome messages, player join and leave announcements, and periodic announcements. Text can include server information and be displayed in chat or as notifications.

Configuration ​

Default configuration ​

Messages.json
json
{
    "m_Enable": 0,
    "m_Welcome": {
        "m_Message": "Welcome, %PlayerName%, to %ServerName%!",
        "m_Notification": 0,
        "m_NotificationTime": 5
    },
    "m_Connected": {
        "m_Message": "%PlayerName% joined the server.",
        "m_Notification": 0,
        "m_NotificationTime": 5
    },
    "m_Disconnected": {
        "m_Message": "%PlayerName% left the server.",
        "m_Notification": 0,
        "m_NotificationTime": 5
    },
    "m_Messages": [
        {
            "m_Message": "This server is using AC-Mod-Pack.",
            "m_Await": 60,
            "m_Interval": 600,
            "m_Notification": 0
        },
        {
            "m_Message": "There are %PlayersCount% players online now.",
            "m_Await": 30,
            "m_Interval": 300,
            "m_Notification": 1
        }
    ]
}

Options ​

OptionTypeDescription
m_EnableboolWith 1, enables event messages and periodic announcements; with 0, disables both.
m_WelcomeobjectMessage sent only to the player who has just joined.
m_ConnectedobjectJoin announcement sent to the other connected players; it is not sent to the joining player.
m_DisconnectedobjectLeave announcement sent to the players who remain connected.
m_Messagesarray<object>List of periodic announcements sent to all connected players. Each entry has its own initial delay and interval. Use [] to schedule no periodic announcements.

m_Welcome, m_Connected and m_Disconnected ​

All three objects use the fields below. In m_Message, %PlayerName% represents the player who joined or left, %ServerName% represents the server name, and %PlayersCount% represents the number of connected players at the time of sending.

OptionTypeDescription
m_MessagestringEvent text. Use "" to disable only this event’s message.
m_NotificationboolWith 0, sends the text through chat; with 1, displays a notification. The displayed sender or title is Server.
m_NotificationTimefloatNotification duration in seconds when m_Notification is 1. Values less than or equal to 0 use 5 seconds. It does not affect messages sent through chat.

m_Messages[] ​

Each object configures an independent periodic announcement. In m_Message, %ServerName% and %PlayersCount% are replaced; %PlayerName% is not replaced in these announcements.

OptionTypeDescription
m_MessagestringPeriodic announcement text sent to all connected players.
m_AwaitintInitial delay in seconds, counted from module initialization. The announcement is sent for the first time after this delay.
m_IntervalintInterval in seconds between subsequent sends of the same announcement. Use a positive value; to disable an announcement, remove its entry from m_Messages.
m_NotificationboolWith 0, sends the announcement through chat; with 1, displays a notification lasting 5 seconds. The displayed sender or title is Server.

The m_Await and m_Interval timers are independent: the interval starts counting only after the first send. Restarting or reloading the module resets the initial announcement delays. The event field m_NotificationTime does not control periodic notification duration.

Chat delivery requires the Chat module to be enabled and uses its event channel, whose visibility also depends on the player’s preferences. Notifications are displayed by the Notification module.

Released under the MIT License.