Skip to main content
Nitrox provides a comprehensive communication system including in-game text chat, server commands, and player coordination features.

In-Game Chat System

The chat system allows players to communicate in real-time while playing.

Chat Interface

Nitrox includes a custom chat UI overlay:
  • Chat log: Displays recent messages from all players
  • Input field: Type messages to send to other players
  • Auto-hide: Chat fades when inactive, shows on new messages
  • Scrollback: View message history
// From PlayerChatManager.cs:13
public class PlayerChatManager
{
    private const char SERVER_COMMAND_PREFIX = '/';
    public static readonly PlayerChatManager Instance = new();
    
    public delegate void PlayerChatDelegate(string message);
    public delegate void PlayerCommandDelegate(string message);
    
    public PlayerChatDelegate OnPlayerChat;
    public PlayerCommandDelegate OnPlayerCommand;
}

Opening Chat

The chat is toggled with a keybind (default: Enter or T):
1

Press Chat Key

Chat overlay appears and input field is focused
2

Type Message

Enter your message text
3

Send Message

Press Enter to send, Esc to cancel
A hint appears the first time you use chat, then is automatically hidden. This is tracked in Nitrox preferences.

Sending Messages

// From PlayerChatManager.cs:122
public void SendMessage()
{
    if (string.IsNullOrWhiteSpace(playerChat.InputText))
    {
        return;
    }
    
    string trimmedInput = playerChat.InputText.Trim();
    if (trimmedInput[0] == SERVER_COMMAND_PREFIX)
    {
        // Server command (starts with /)
        OnPlayerCommand?.Invoke(trimmedInput.Substring(1));
    }
    else
    {
        // Regular chat message
        OnPlayerChat?.Invoke(trimmedInput);
    }
}

Chat Packets

Messages are transmitted via the ChatMessage packet:
// From ChatMessage.cs:7
public class ChatMessage : Packet
{
    public ushort PlayerId { get; }
    public string Text { get; }
    public const ushort SERVER_ID = ushort.MaxValue;
    
    public ChatMessage(ushort playerId, string text)
    {
        PlayerId = playerId;
        Text = text;
    }
}
  • Player IDs: 0 to 65534 - Regular players
  • Server ID: 65535 (ushort.MaxValue) - Messages from server

Receiving Messages

// From PlayerChatManager.cs:111
public void AddMessage(string playerName, string message, Color color)
{
    yield return playerChat.WriteLogEntry(playerName, message, color);
}
Messages display with:
  • Player name in colored text
  • Message content
  • Color coding for different message types

Command System

Commands start with / and are processed by the server.

Command Syntax

/commandname [required_arg] [optional_arg]

Permission Levels

Commands require specific permission levels:

PLAYER

Basic commands available to all players

MODERATOR

Moderation and server management

ADMIN

Full administrative access

CONSOLE

Server console only
// From Command.cs - all commands extend this base
public abstract class Command
{
    public string Name { get; }
    public Perms RequiredPermission { get; }
    public string Description { get; }
    public IEnumerable<string> Aliases { get; }
    
    protected abstract void Execute(CallArgs args);
}

Available Commands

Player Commands

These commands are available to all players:
Display list of available commands or detailed help for a specific commandAliases: /?Examples:
/help              # List all commands
/help broadcast    # Show help for broadcast command
// From HelpCommand.cs:14
public HelpCommand() : base("help", Perms.PLAYER, "Displays this")
{
    AddParameter(new TypeString("command", false, 
        "Command to see help information for"));
}
Authenticate with admin password to gain admin permissionsExamples:
/login myAdminPassword123
Admin password is set in server.cfg. Default is a randomly generated 12-character string.
Return to your last known position before teleportation or deathExamples:
/back

Moderator Commands

Require MODERATOR or higher permissions:
Send a server-wide announcement to all playersAliases: /sayExamples:
/broadcast Server restart in 5 minutes!
/say Welcome to our Nitrox server!
// From BroadcastCommand.cs:12
public BroadcastCommand() : base("broadcast", Perms.MODERATOR, 
    "Broadcasts a message on the server")
{
    AddParameter(new TypeString("message", true, 
        "The message to be broadcast"));
    AllowedArgOverflow = true;
}
Disconnect a player from the serverExamples:
/kick PlayerName
/kick PlayerName Griefing bases
Prevent a player from sending chat messagesExamples:
/mute SpammerName

Admin Commands

Require ADMIN permissions:
Grant admin permissions to a playerExamples:
/op TrustedPlayer
Remove admin permissions from a playerExamples:
/deop FormerAdmin
Grant moderator permissions to a playerExamples:
/promote NewModerator
Change game mode for yourself or another playerModes: survival, freedom, hardcore, creativeExamples:
/gamemode creative
/gamemode survival PlayerName
Change the server’s default game modeExamples:
/changeservergamemode creative
Manually trigger a world saveExamples:
/save
Create a backup of the current world stateExamples:
/backup
Enable or disable automatic world savingExamples:
/autosave off
/autosave on
Control Aurora explosion timingModes: restore, explode, countdown <time>Examples:
/aurora explode
/aurora countdown 300
/aurora restore
Control Sunbeam arrival eventModes: arrive, destroyExamples:
/sunbeam arrive
/sunbeam destroy
Toggle player vs player damageExamples:
/pvp off
/pvp on
Toggle whether a player keeps inventory on deathExamples:
/setkeepinventory true
/setkeepinventory PlayerName false
Change the server admin passwordExamples:
/changeadminpassword MyNewSecurePassword123
Change the server join passwordExamples:
/changeserverpassword NewServerPass
/changeserverpassword "" # Remove password

Server Console Commands

These commands only work from the server console:
Gracefully shut down the server (saves world first)Examples:
stop
Display all connected playersExamples:
list
Display server statistics and informationExamples:
summary
View or modify server configurationExamples:
config                    # View all settings
config MaxConnections     # View specific setting
config MaxConnections 20  # Change setting

Player Coordination Features

Player List Tab

Nitrox adds a player list to the PDA showing:
  • All connected players
  • Player names and colors
  • Distance from local player
  • Quick ping/waypoint features

Player Pings

Players can ping locations visible to all players:
  • Waypoint markers
  • Distance indicators
  • Collaborative exploration

Muting Players

Moderators can mute disruptive players:
// MutePlayer packet prevents chat messages from being broadcast
public class MutePlayer : Packet
{
    public ushort PlayerId { get; }
    public bool IsMuted { get; }
}
Muted players:
  • Cannot send chat messages
  • See a notification they are muted
  • Can still use commands (if they have permissions)

Message Colors

Chat messages use color coding:
  • Player messages: Player’s chosen color
  • Server broadcasts: Yellow/gold
  • System messages: White/gray
  • Error messages: Red
  • Success messages: Green

Chat Preferences

Chat behavior can be configured in Nitrox client settings:
// From PlayerChatManager.cs:86
if (!NitroxPrefs.ChatUsed.Value)
{
    DisableChatKeyHint();
}
  • First-time chat hint display
  • Chat notification settings
  • Message history length

Technical Implementation

Command Processing

1

Client Input

Player types /command args in chat
2

Command Detection

Client detects / prefix and extracts command
3

Send to Server

Command sent via packet to server
4

Server Validation

Server checks player permissions and command existence
5

Execute

Command handler executes with parsed arguments
6

Response

Result sent back to player or broadcast to all

Command Arguments

Commands support typed parameters:
// Available parameter types:
- TypeString    // Text arguments
- TypeInt       // Integer numbers
- TypeFloat     // Decimal numbers
- TypeBoolean   // true/false
- TypePlayer    // Player name lookup
- TypeNitroxId  // Entity ID
- TypeEnum      // Enumeration values

Custom Commands

Developers can add custom commands by extending the Command base class:
public class MyCustomCommand : Command
{
    public MyCustomCommand() : base("mycommand", Perms.PLAYER, "Does something cool")
    {
        AddParameter(new TypeString("arg", true, "Required argument"));
    }
    
    protected override void Execute(CallArgs args)
    {
        string arg = args.Get<string>(0);
        SendMessageToPlayer(args.Sender, $"You said: {arg}");
    }
}

Best Practices

Clear Communication

Use descriptive messages when coordinating base building or exploration

Command Permissions

Only grant admin/moderator permissions to trusted players

Server Announcements

Use /broadcast for important server notifications

Regular Backups

Use /backup before major world changes or admin commands

Troubleshooting

Chat Not Appearing

  • Check if chat key is bound in settings
  • Verify Nitrox client is properly installed
  • Check for UI mods that may conflict

Commands Not Working

  • Ensure command starts with /
  • Check you have required permissions (/help to see available commands)
  • Verify correct syntax with /help <command>
  • Check server logs for error messages

Muted by Mistake

  • Contact server admin/moderator
  • Admin can check mute status and unmute
  • Restart may not clear mute (persists in player data)

Multiplayer

Player permissions and session management

World Management

Server configuration and admin commands

Synchronization

How chat messages are synchronized

Build docs developers (and LLMs) love