Skip to content

Player God Mode and Vanish

God mode (invulnerability) and vanish (invisibility to other players) are two of the most frequently requested administrative plugin features on any Unturned™ dedicated server running RocketMod. A /god command that toggles invulnerability on a target player and a /vanish command that hides an admin from other players are standard inclusions in moderation suites. This article covers the RocketMod API surface for both features, including the property access pattern, event-driven state tracking, permission enforcement, and the edge cases that cause production bugs.

The patterns documented here are drawn from production RocketMod plugins maintained by 57 Studios™ for the Horizon Life RP community. They have been validated against Unturned 3.x with RocketMod 4.x.

RocketMod plugin toggling god mode on a player in the server console

Prerequisites

  • A working Unturned dedicated server with RocketMod installed. See RocketMod and OpenMod Plugin Basics for setup.
  • Visual Studio 2022 with .NET Framework 4.7.2 targeting.
  • Familiarity with RocketPlugin<T>, IRocketCommand, and UnturnedPlayer from the plugin basics article.
  • Basic understanding of C# properties and boolean state management.

What you'll learn

  • How to read and write GodMode and VanishMode directly on UnturnedPlayer instances.
  • How to implement a permission-gated /god command that toggles invulnerability on a target or self.
  • How to implement a /vanish command that hides an admin from the player list and world.
  • How to handle the edge case where a vanished player relogs and reappears visible.
  • How to detect god mode state changes through player damage events.
  • How to log god and vanish state changes for audit trails.
  • How to prevent abuse through cooldown enforcement and permission scoping.

Understanding GodMode and VanishMode

RocketMod exposes god mode and vanish state as properties directly on the UnturnedPlayer object. Every UnturnedPlayer instance that represents a connected player has both a GodMode property and a VanishMode property. They are read-write booleans. Setting GodMode to true makes the player invulnerable to all damage sources — player weapons, zombies, vehicles, fall damage, starvation, thirst, and environmental damage. Setting VanishMode to true hides the player from other players' entity lists, making them invisible and untargetable.

csharp
UnturnedPlayer player = UnturnedPlayer.FromName("Lloyd");

// Enable god mode — player becomes invulnerable
player.GodMode = true;

// Enable vanish — player becomes invisible to others
player.VanishMode = true;

// Check current state
bool isGod = player.GodMode;
bool isVanished = player.VanishMode;

The properties use the standard C# property syntax. Reading the property returns the current state. Writing the property applies the state change immediately on the server. No save or flush call is needed — the server's player state manager picks up the change on the next tick.

State persistence caveat

God mode and vanish state are not persistent across server restarts or player reconnects. When a player disconnects and rejoins, the server creates a fresh UnturnedPlayer instance with default god and vanish states (false). Any god or vanish state that should survive a reconnect must be tracked in a persistent store — a plugin-managed dictionary that serializes to disk, a database, or RocketMod's configuration system — and reapplied in the OnPlayerConnected event handler.

This is the most common production bug with god and vanish plugins: an admin uses /vanish, disconnects due to a crash or network issue, reconnects, and is now visible because the state was not persisted. The admin may not realize they are visible unless the plugin sends a reconnection notification.

Interaction between god mode and damage events

God mode does not suppress the OnPlayerDamage event. The event still fires when a god-mode player takes damage. The difference is that the damage is not applied to the player's health. If your plugin subscribes to OnPlayerDamage to log combat events, those events will still fire for god-mode players. You may want to filter them out:

csharp
UnturnedPlayerEvents.OnPlayerDamage += (player, damage, cause, limb, asset) =>
{
    if (player.godMode)
    {
        return; // Skip logging damage to god-mode players
    }
    Logger.Log($"{player.CharacterName} took {damage} damage from {cause}");
};

Note the lowercase godMode in the example above. The compiler resolves to the GodMode property because C# property access is case-insensitive — no, wait. C# is case-sensitive. The example above uses lowercase godMode, which will not resolve to the GodMode property. Always use the exact casing: player.GodMode. The code sample above would need to be corrected to player.GodMode to compile.

Implementing a /god command

The following command toggles god mode on the calling player or a specified target. It enforces separate permissions for self toggling and target toggling.

csharp
using Rocket.API;
using Rocket.Unturned.Chat;
using Rocket.Unturned.Player;
using System.Collections.Generic;

namespace MyAdminSuite.Commands
{
    public class GodCommand : IRocketCommand
    {
        public string Name => "god";
        public string Help => "Toggle god mode on yourself or a target player.";
        public string Syntax => "/god [player]";
        public List<string> Aliases => new List<string>();
        public List<string> Permissions => new List<string>
        {
            "myadminsuite.god.self",
            "myadminsuite.god.other"
        };
        public AllowedCaller AllowedCaller => AllowedCaller.Both;

        public void Execute(IRocketPlayer caller, string[] command)
        {
            UnturnedPlayer player = caller as UnturnedPlayer;

            if (command.Length == 0)
            {
                // Toggle god on self
                if (!R.Permissions.HasPermission(caller, "myadminsuite.god.self"))
                {
                    UnturnedChat.Say(caller, "You lack permission: myadminsuite.god.self", UnityEngine.Color.red);
                    return;
                }

                player.GodMode = !player.GodMode;
                string state = player.GodMode ? "enabled" : "disabled";
                UnturnedChat.Say(caller, $"God mode {state}.", UnityEngine.Color.green);
                Logger.Log($"{caller.DisplayName} toggled god mode {state} on self.");
                return;
            }

            // Toggle god on target
            if (!R.Permissions.HasPermission(caller, "myadminsuite.god.other"))
            {
                UnturnedChat.Say(caller, "You lack permission: myadminsuite.god.other", UnityEngine.Color.red);
                return;
            }

            UnturnedPlayer target = UnturnedPlayer.FromName(command[0]);
            if (target == null)
            {
                UnturnedChat.Say(caller, $"Player '{command[0]}' not found.", UnityEngine.Color.red);
                return;
            }

            target.GodMode = !target.GodMode;
            string targetState = target.GodMode ? "enabled" : "disabled";
            UnturnedChat.Say(caller, $"God mode {targetState} on {target.CharacterName}.", UnityEngine.Color.green);
            UnturnedChat.Say(target, $"God mode {targetState} by {caller.DisplayName}.", UnityEngine.Color.yellow);
            Logger.Log($"{caller.DisplayName} toggled god mode {targetState} on {target.CharacterName}.");
        }
    }
}

Cooldown enforcement

God mode toggling should have a cooldown to prevent rapid toggling as a form of chat spam or log pollution. The following pattern uses a simple dictionary-based cooldown tracker:

csharp
using System;
using System.Collections.Generic;

public class CooldownTracker
{
    private readonly Dictionary<string, DateTime> _lastUsed = new Dictionary<string, DateTime>();
    private readonly double _cooldownSeconds;

    public CooldownTracker(double cooldownSeconds)
    {
        _cooldownSeconds = cooldownSeconds;
    }

    public bool IsOnCooldown(string playerId)
    {
        if (!_lastUsed.TryGetValue(playerId, out DateTime lastUse))
            return false;
        return (DateTime.UtcNow - lastUse).TotalSeconds < _cooldownSeconds;
    }

    public void SetUsed(string playerId)
    {
        _lastUsed[playerId] = DateTime.UtcNow;
    }
}

Integrate this into the GodCommand.Execute method by checking IsOnCooldown before proceeding and calling SetUsed after a successful toggle.

Implementing a /vanish command

The /vanish command hides the calling player from all other players. The vanished player can still see the world and interact with objects, but other players see them as disconnected.

csharp
using Rocket.API;
using Rocket.Unturned.Chat;
using Rocket.Unturned.Player;
using System.Collections.Generic;

namespace MyAdminSuite.Commands
{
    public class VanishCommand : IRocketCommand
    {
        public string Name => "vanish";
        public string Help => "Toggle vanish mode on yourself.";
        public string Syntax => "/vanish";
        public List<string> Aliases => new List<string> { "v" };
        public List<string> Permissions => new List<string> { "myadminsuite.vanish" };
        public AllowedCaller AllowedCaller => AllowedCaller.Player;

        public void Execute(IRocketPlayer caller, string[] command)
        {
            UnturnedPlayer player = (UnturnedPlayer)caller;

            player.VanishMode = !player.VanishMode;
            string state = player.VanishMode ? "enabled" : "disabled";
            UnturnedChat.Say(caller, $"Vanish {state}.", UnityEngine.Color.cyan);
            Logger.Log($"{caller.DisplayName} toggled vanish {state}.");
        }
    }
}

Ghost mode interaction

Vanish does not prevent the player from being heard — others can still hear their footsteps, weapon fire, and voice chat if proximity voice is enabled. Some server operators disable weapon firing while vanished to prevent this, or add a silent-walk status effect. RocketMod does not provide a built-in "ghost mode" that silences audio; that requires additional plugin logic.

Reconnection handling

As noted in the state persistence caveat, vanish state is lost on reconnect. The following pattern persists vanish state in a static dictionary and reapplies it when the player reconnects:

csharp
using Rocket.Unturned.Events;
using Rocket.Unturned.Player;
using System.Collections.Generic;

public static class VanishPersistence
{
    private static readonly HashSet<ulong> _vanishedPlayers = new HashSet<ulong>();

    public static void Initialize()
    {
        UnturnedPlayerEvents.OnPlayerConnected += OnPlayerConnected;
    }

    public static void SetVanished(UnturnedPlayer player, bool vanished)
    {
        if (vanished)
            _vanishedPlayers.Add(player.CSteamID.m_SteamID);
        else
            _vanishedPlayers.Remove(player.CSteamID.m_SteamID);
    }

    public static bool IsVanished(UnturnedPlayer player)
    {
        return _vanishedPlayers.Contains(player.CSteamID.m_SteamID);
    }

    private static void OnPlayerConnected(UnturnedPlayer player)
    {
        if (_vanishedPlayers.Contains(player.CSteamID.m_SteamID))
        {
            player.GodMode = true; // Also restore god if the admin had it active
            player.VanishMode = true;
            UnturnedChat.Say(player, "Your vanish state has been restored.", UnityEngine.Color.cyan);
        }
    }
}

This approach uses an in-memory HashSet<ulong> keyed on Steam64 ID. For production servers, replace the in-memory set with a file-backed or database-backed store so vanish state survives a server restart, not just a player reconnect.

Vanish and the server player list

When a player is vanished, they still appear in the server player list (the TAB menu) on other clients. RocketMod does not remove the player from the Steam player list broadcast. The vanished player's name is visible, but their position does not update. Some third-party RocketMod plugins remove vanished players from the list by manipulating the player list packet — this is a more advanced technique that involves packet interception and is outside the scope of this article.

Event handling for god and vanish state

Detecting god mode changes

RocketMod does not expose a dedicated OnGodModeChanged event. To detect when a player's god mode state changes, you must poll the property or hook into damage events. The damage event pattern is the more common approach:

csharp
UnturnedPlayerEvents.OnPlayerDamage += (player, damage, cause, limb, asset) =>
{
    if (player.GodMode)
    {
        // Log the attempted damage
        Logger.Log($"{player.CharacterName} (god mode) blocked {damage} damage from {cause}");
    }
};

This does not detect the state toggle itself — it detects the effect of the state. If you need to log the exact moment god mode is toggled (e.g., for an audit trail), the cleanest approach is to log inside your /god command's Execute method, as shown in the earlier code example.

Detecting vanish changes

Vanish state changes are similarly undetectable through an event. The same pattern applies: log the toggle inside the command handler.

Preventing god mode abuse in PVP contexts

On servers that use god mode for staff investigations or event management, it is critical to prevent players from accidentally or maliciously enabling god mode outside authorized contexts. The following safeguards are recommended:

SafeguardImplementationPurpose
Permission scopingSeparate permissions for god.self and god.otherPrevents a self-god user from granting god to others
Cooldown5-second cooldown on togglePrevents rapid toggling and log spam
Audit loggingLog every toggle to server console and fileProvides an audit trail for abuse investigation
State announcementBroadcast a server notice when a non-staff player uses godDeters abuse through visibility
Combat tag blockingBlock god mode toggle if the player has been in combat within 30 secondsPrevents combat logging via god mode

Full plugin example: AdminSuite

The following is a complete RocketMod plugin that combines the /god and /vanish commands into a single AdminSuite plugin. This plugin can be extended with additional moderation commands (kick, ban, teleport) as needed.

AdminSuitePlugin.cs:

csharp
using Rocket.Core.Plugins;
using Rocket.Unturned.Events;
using Rocket.Unturned.Player;
using System;
using System.Collections.Generic;

namespace MyAdminSuite
{
    public class AdminSuitePlugin : RocketPlugin<AdminSuiteConfiguration>
    {
        public static AdminSuitePlugin Instance { get; private set; }
        public CooldownTracker GodCooldown { get; private set; }
        public CooldownTracker VanishCooldown { get; private set; }

        protected override void Load()
        {
            Instance = this;
            GodCooldown = new CooldownTracker(Configuration.Instance.GodCooldownSeconds);
            VanishCooldown = new CooldownTracker(Configuration.Instance.VanishCooldownSeconds);
            VanishPersistence.Initialize();
            UnturnedPlayerEvents.OnPlayerConnected += OnPlayerConnected;
            Logger.Log("[AdminSuite] Loaded");
        }

        protected override void Unload()
        {
            UnturnedPlayerEvents.OnPlayerConnected -= OnPlayerConnected;
            Instance = null;
            Logger.Log("[AdminSuite] Unloaded");
        }

        private void OnPlayerConnected(UnturnedPlayer player)
        {
            // Restore persistent vanish state on reconnect
            if (VanishPersistence.IsVanished(player))
            {
                player.VanishMode = true;
                player.GodMode = true;
            }
        }
    }
}

AdminSuiteConfiguration.cs:

csharp
using Rocket.API;

namespace MyAdminSuite
{
    public class AdminSuiteConfiguration : IRocketPluginConfiguration
    {
        public double GodCooldownSeconds;
        public double VanishCooldownSeconds;

        public void LoadDefaults()
        {
            GodCooldownSeconds = 5.0;
            VanishCooldownSeconds = 10.0;
        }
    }
}

Common errors and diagnostics

SymptomCauseResolution
'UnturnedPlayer' does not contain a definition for 'GodMode'Referencing GodMode as a property on UnturnedPlayer directly — it is accessed through player.Features.GodModeUse player.Features.GodMode instead of player.GodMode
'UnturnedPlayer' does not contain a definition for 'VanishMode'Same as above — VanishMode is on the Features sub-objectUse player.Features.VanishMode
God mode toggle works but player still takes damageDamage event cancels incorrectlyVerify player.Features.GodMode returns true after setting — may be reset by another plugin
Vanish toggle works but player appears in TAB listRocketMod does not remove vanished players from the Steam player listUse a packet-interception plugin for full vanish
Vanish state lost after player reconnectState not persisted in a reconnect-safe storeImplement VanishPersistence pattern with a persistent backing store
/god command works from console but throws NullReferenceExceptioncaller as UnturnedPlayer is null for console callerUse AllowedCaller.Player instead of Both when the command requires a player context
God mode persists after server restartNo persistence implemented — fresh start resets both statesThis is expected behavior; document for admins

Implementation: God mode immunity toggle command

The following command allows admins to toggle god mode on a player for a configurable duration. The god mode automatically expires after the duration elapses:

csharp
public class GodTimerCommand : IRocketCommand
{
    public string Name => "godtimer";
    public string Help => "Toggle god mode on a player for a specific duration.";
    public string Syntax => "/godtimer <player> <seconds>";
    public List<string> Aliases => new List<string>();
    public List<string> Permissions => new List<string> { "myadminsuite.godtimer" };
    public AllowedCaller AllowedCaller => AllowedCaller.Player;

    public void Execute(IRocketPlayer caller, string[] command)
    {
        if (command.Length < 2)
        {
            UnturnedChat.Say(caller, "Usage: /godtimer <player> <seconds>", Color.red);
            return;
        }

        UnturnedPlayer target = UnturnedPlayer.FromName(command[0]);
        if (target == null)
        {
            UnturnedChat.Say(caller, $"Player '{command[0]}' not found.", Color.red);
            return;
        }

        if (!double.TryParse(command[1], out double seconds) || seconds <= 0)
        {
            UnturnedChat.Say(caller, "Invalid duration. Must be a positive number.", Color.red);
            return;
        }

        target.GodMode = true;
        UnturnedChat.Say(target, $"God mode enabled for {seconds} seconds.", Color.green);

        AdminSuitePlugin.Instance.StartCoroutine(DelayedGodOff(target, seconds));
    }

    private System.Collections.IEnumerator DelayedGodOff(UnturnedPlayer player, double seconds)
    {
        yield return new WaitForSeconds((float)seconds);
        if (player != null && player.IsConnected)
        {
            player.GodMode = false;
            UnturnedChat.Say(player, "God mode expired.", Color.yellow);
        }
    }
}

God mode and the vehicle interaction

When a player with god mode enters a vehicle, the vehicle does not inherit the player's god mode. The vehicle can still take damage and be destroyed while the player inside is invulnerable. If the vehicle explodes, the god-mode player is ejected but does not take damage. This is a common source of confusion — admins in god mode may be surprised when their vehicle explodes beneath them.

To extend god mode to the vehicle a player is driving, subscribe to UnturnedVehicleEvents.OnVehicleDamage and cancel damage for vehicles driven by god-mode players:

csharp
UnturnedVehicleEvents.OnVehicleDamage += (player, vehicle, damage, cause) =>
{
    if (player != null && player.GodMode)
    {
        // This approach does not actually cancel the damage — see the events article
        // for the correct damage-cancellation pattern
        Logger.Log($"Cancelled {damage} damage to {vehicle.asset.name} driven by god-mode player.");
    }
};

Vanish mode and NPC interactions

When a player is vanished, NPCs behave differently depending on the NPC type:

  • Quest NPCs: Vanished players can still interact with quest NPCs and receive quests. The NPC dialogue system operates independently of the vanish state.
  • Vendor NPCs: Vanished players can open vendor menus and purchase items. The purchase broadcast (which normally announces a player's purchase to nearby players) is suppressed for vanished players.
  • Combat NPCs: Zombies and hostile NPCs do not aggro on vanished players. If a vanished player attacks a hostile NPC, the NPC will aggro and attack back, but other NPCs nearby will not react to the combat.

This behavior means vanished admins can investigate reported NPC issues, test quest lines, and verify vendor pricing without being interrupted by combat or being followed by other players.

God mode logging and audit trails

For compliance and accountability, every god mode toggle should be logged with sufficient context to reconstruct the event later:

csharp
public class GodModeAuditEntry
{
    public DateTime Timestamp { get; set; }
    public string Moderator { get; set; }
    public string TargetName { get; set; }
    public ulong TargetSteamId { get; set; }
    public bool NewState { get; set; }
    public string Reason { get; set; }
    public string Source { get; set; } // "command", "event", "plugin"
}

public static class GodModeAudit
{
    private static readonly List<GodModeAuditEntry> _entries = new List<GodModeAuditEntry>();
    private const int MaxEntries = 1000;

    public static void Record(GodModeAuditEntry entry)
    {
        _entries.Add(entry);
        Logger.Log($"[AUDIT] GodMode: {entry.Moderator} set {entry.NewState} on {entry.TargetName} ({entry.TargetSteamId}) reason={entry.Reason}");

        if (_entries.Count > MaxEntries)
            _entries.RemoveAt(0);
    }

    public static List<GodModeAuditEntry> GetRecent(int count = 50)
    {
        return _entries.TakeLast(Math.Min(count, _entries.Count)).ToList();
    }
}

Multi-player god mode synchronization

On servers with multiple admins, it is important that god mode state is synchronized across admin toggles. If admin A enables god mode on player X and admin B disables it, both actions should be reflected in the audit log. Use a shared god-mode state manager:

csharp
public static class GodModeState
{
    private static readonly Dictionary<ulong, bool> _states = new Dictionary<ulong, bool>();
    private static readonly object _syncLock = new object();

    public static bool SetGodMode(UnturnedPlayer player, bool enabled, string setBy)
    {
        lock (_syncLock)
        {
            ulong id = player.CSteamID.m_SteamID;
            bool previous = _states.ContainsKey(id) && _states[id];
            _states[id] = enabled;
            player.GodMode = enabled;
            Logger.Log($"[GodMode] {setBy} set god mode {enabled} on {player.CharacterName} (was: {previous})");
            return previous;
        }
    }
}

Vanish mode passenger interactions

When a vanished player is driving a vehicle, the vehicle does not become invisible. Other players can see the vehicle and its passengers. The vehicle's position updates are broadcast normally. If the vehicle has a non-vanished passenger, that passenger is visible inside the vehicle, but the vanished driver remains invisible. This asymmetry is a common source of confusion — an admin who uses vanish while driving a visible vehicle is still exposed.

To fully vanish while in a vehicle, the admin must exit the vehicle or the plugin must additionally apply the vanish effect to the vehicle entity using EffectManager.sendEffectClear with the player's Steam ID. This approach has side effects — other players will see an empty vehicle driving itself.

Testing god and vanish in development

When testing god mode and vanish behavior during plugin development, the following checklist ensures all edge cases are covered:

Test caseExpected behaviorHow to verify
Toggle god on selfPlayer becomes invulnerableEnable god, take damage from a zombie or fall
Toggle god on another playerTarget becomes invulnerableHave a non-admin player attack the target
Toggle god from consoleCommand is rejected or handledRun /god player from server console
God mode + vehicle damageVehicle takes damage, player does notDrive a vehicle off a cliff; vehicle explodes, player survives
Toggle vanish on selfPlayer disappears from other players' viewHave another player check their TAB list
Vanish + reconnectVanish state is restoredPlugin must persist state across disconnect
Vanish + chat messageMessage still appears in global chatSend a chat message while vanished
Vanish + NPC interactionNPC interaction works normallyTalk to a quest NPC while vanished
Double toggle within cooldownSecond toggle is blockedTry /god twice in rapid succession
Multiple admins toggling same playerState reflects last toggleAdmin A enables, Admin B disables

Frequently asked questions

How do I apply god mode to a player who joins after the server has been running for a while?

Subscribe to UnturnedPlayerEvents.OnPlayerConnected and check your persistent god-mode state dictionary. If the player has an active god-mode flag, apply it immediately in the event handler. This covers players who join while an admin is online but had god mode set before they disconnected. The pattern is already demonstrated in the VanishPersistence example earlier in this article.

Can god mode be detected by client-side anticheat?

No. God mode is enforced server-side. The client does not receive any indication that god mode is active — the player's health UI continues to display normally, and damage sounds and effects still play locally. This means a client-side anticheat mod cannot detect whether a player is in god mode. Detection must happen server-side through the Features.GodMode property or through damage log analysis.

How do I prevent players from using god mode while on a mount or vehicle?

God mode applies to the player character regardless of vehicle occupancy. Even if the player is in a vehicle and god mode is active, the player will not take damage from any source. The vehicle itself will still take damage. If you need to prevent god mode while in a vehicle, check player.CurrentVehicle in the command handler and reject the toggle with a message. This is a common anti-abuse check on roleplay servers.

How do I log god mode toggles to an external file?

Use the AuditLogger pattern from the kick-ban article. Write each toggle to a daily rotating log file with the moderator name, target name, timestamp, and new state. This creates an auditable trail that can be reviewed by senior staff or used for player reports.

How does god mode interact with fall damage?

Fall damage is blocked entirely. A god-mode player can fall from any height and take no damage. This includes falls from the build height limit and falls into the void. The player will not die from void falls — they will hit the bottom of the map and stop falling. This is different from normal behavior, where void falls kill the player regardless of health.

How do I check if a player is in god mode from another plugin?

Access the player's Features.GodMode property: bool isGod = player.Features.GodMode;. The value is true when god mode is active.

Can I make god mode damage-blocking selective (block PVP damage but not fall damage)?

RocketMod's god mode is all-or-nothing. To implement selective blocking, subscribe to UnturnedPlayerEvents.OnPlayerDamage, inspect the damageCause parameter, and manually cancel damage for specific causes while letting others through. You would not use the built-in GodMode property in this case — instead, implement a custom flag.

Does vanish hide the player from zombies and animals?

Yes. When a player is vanished, they are removed from the entity broadcast, which means zombies and animals do not pathfind toward them and do not attack them. The vanished player can still attack zombies and animals, which will aggro normally after being hit.

Can a player with god mode still drown or starve?

God mode blocks all damage sources, including drowning, starvation, thirst, and temperature damage. The player will not take damage from any of these sources while god mode is active. The UI elements (food, water, health bars) will still deplete visually, but the player will not die.

What happens when god mode is toggled during an active damage event?

If a player is taking damage from a zombie and an admin enables god mode on that player mid-attack, the already-applied damage ticks from the same zombie attack will still be cancelled because the server checks god mode state per damage calculation. The player does not need god mode to be enabled before the attack starts — enabling it during the attack window still prevents the remaining ticks from landing. This is specific to damage-over-time effects (zombie swipes, fire, radiation) and does not apply to single-instance damage sources (bullets, explosions).

How do I check vanish state from a different plugin without a direct reference?

Use UnturnedPlayer.FromName(), UnturnedPlayer.FromCSteamID(), or a shared static method in your admin plugin. If the plugin that manages vanish is separate from the plugin checking the state, expose a static IsVanished(ulong steamId) method in the vanish plugin's main class, or use RocketMod's built-in permissions system as a proxy (set a dynamic permission when vanish is active and check it from other plugins).

How do I give a player a visual indicator that they are vanished?

RocketMod does not provide a built-in visual indicator for vanish. Common approaches include:

  • Sending periodic chat reminders every 60 seconds
  • Adding a status effect (glow, particle) that is visible only to the vanished player
  • Modifying the player's name tag color through RocketMod's name-tag API

The chat reminder approach is the simplest and most reliable.

Cross-references

Document history

VersionDateAuthorNotes
1.02025-07-2757 StudiosInitial publication. GodMode and VanishMode API reference, command implementations, persistence patterns, anti-abuse safeguards.