Jump to content

1 Screenshot

  • 205
  • 5
  • 8.99 kB
  • Update details
    v1.3.0
    Released
    Download size8.99 kB
    Total versions2
    Time between versions 50 days
    Typical update pace About every 50 days
    Freshness Updated today

Works with

Compatible add-ons, packages, or tools that pair well with this resource.

About Switch Guard

SwitchGuard

Prevents unauthorized players from toggling Industrial Conveyors and Fluid Switches (water pump switches) on your server. Integrates with Clans, Friends, and Rust Teams so teammates can still use shared infrastructure.

Features

  • Blocks unauthorized toggling of Industrial Conveyors (on/off)
  • Blocks unauthorized toggling of Fluid Switches (water pump switches)
  • Integrates with Clans, Friends, and native Rust Teams
  • TC (Tool Cupboard) authorization support
  • Per-entity-type protection (enable/disable independently)
  • Message cooldown to prevent chat spam
  • Multi-language support (English, Portuguese, Spanish)
  • Zero performance impact — uses HarmonyPatch to intercept only player-initiated toggles
  • No data storage required — fully stateless

How It Works

When a player tries to toggle an Industrial Conveyor or Fluid Switch, the plugin checks (in order):

  1. Permission bypass — switchguard.bypass
  2. Admin permission — switchguard.admin
  3. Server admin — if enabled in config
  4. Owner — the player who placed the entity can always toggle it
  5. TC Authorization — if the player is authorized on the nearby Tool Cupboard
  6. Clans — if the player is in the same clan or an allied clan as the owner
  7. Friends — if the player is friends with the owner
  8. Rust Teams — if the player is on the same team as the owner

If none of these checks pass, the toggle is blocked and the player receives a message.

Note: Entities with no owner (OwnerID = 0) are not protected — anyone can toggle them.

Permissions

Permission Description
switchguard.bypass       Bypass all protection checks
switchguard.admin       Admin-level bypass

Configuration

JSON Configuration:

{
  "Admin can always toggle (server.IsAdmin bypass)": false,
  "Use Friends API": true,
  "Use Clans API": true,
  "Use Rust Teams": true,
  "Use TC Authorization": true,
  "Protect Industrial Conveyors": true,
  "Protect Fluid Switches": true,
  "Message cooldown (seconds)": 3.0
}
Option Default Description
Admin can always toggle false Allow server admins to toggle any protected entity
Use Friends API true Check Friends plugin for authorization
Use Clans API true Check Clans plugin for authorization
Use Rust Teams true Check native Rust teams for authorization
Use TC Authorization true Allow toggle if player is authed on the nearby TC
Protect Industrial Conveyors true Enable protection for Industrial Conveyors
Protect Fluid Switches true Enable protection for Fluid Switches
Message cooldown 3.0 Seconds between "not authorized" messages per player

Supported Plugins (Optional)

  • Clans — clan member and ally checks
  • Friends — friend relationship checks

These are optional. If not installed, the corresponding checks are simply skipped.

Localization

The plugin ships with three languages. Custom messages can be edited in the lang files.

English (en)

{
  "NotAuthorized": "You are not authorized to toggle this device.",
  "NoPermission": "You do not have permission to use this."
}

Portuguese (pt-BR)

{
  "NotAuthorized": "Voce nao tem autorizacao para ligar/desligar este dispositivo.",
  "NoPermission": "Voce nao tem permissao para usar isso."
}

Spanish (es-ES)

{
  "NotAuthorized": "No tienes autorizacion para activar/desactivar este dispositivo.",
  "NoPermission": "No tienes permiso para usar esto."
}

FAQ

Q: Does this affect circuit-driven toggles (power on/off via wiring)?

A: No. Only manual player interactions are intercepted. Electrical circuits, power sources, and timer-based toggles work normally.

Q: Does this protect regular Electric Switches?

A: No, only Fluid Switches and Industrial Conveyors. Regular Electric Switches are unaffected.

Q: What happens if I don't have Clans or Friends installed?

A: The plugin works fine without them. Those checks are simply skipped, and authorization falls back to owner, TC auth, and teams.

Q: Does this work with Carbon and Oxide?

A: Yes. The plugin uses HarmonyLib which is supported by both frameworks.


romzar's Collection

User Feedback

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.5m
Total downloads
Customers
11.1k
Customers served
Files Sold
159.2k
Marketplace sales
Payments
3.4m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.