MyPlayerBuilds
MyPlayerBuilds MyPlayerBuilds

Free

Checkout
MyPlayerBuilds

MyPlayerBuilds

Project details

Project: MyPlayerBuilds
dev language: c# oxide
Plugin language: en, de
Author: Danevi / RustFlashv2.2.0 Author: @RustFlash

Description

MyPlayerBuilds is a Rust plugin that allows players to save, load, list, and delete their own bases—per player, including limits, cooldowns, and optional backups. It uses the CopyPaste plugin for the actual copying/pasting. If CopyPaste is missing, the plugin will unload immediately.

Features

  • Save/load player bases (via CopyPaste): Hook on OnCopyFinished, file is copied to a player-specific folder; when loading, it is temporarily written to the CopyPaste directory and then cleaned up again.
  • Limits & cooldown: Max. bases/player and save cooldown are configurable; hard checks before each /save.
  • Backups: When overwriting, timestamp backups are created (optional).
  • Validations: Name regex ([a-zA-Z0-9_-]+), look at building blocks for saving, ground for loading; timeout fallback if the copy hook does not fire.

Requirements

  • CopyPaste plugin (must be loaded; otherwise MyPlayerBuilds will be unloaded again at startup)

Commands

  1. /save <name> [copy-args…] Saves the base when you view a building block. Enforces name regex, max base limit, and cooldown; sets a pending save, triggers copy, and waits for OnCopyFinished (10 s timeout).

  2. /load <name> [paste-args…]
    Loads the base at the ground position you are looking at. Copies the player file to copypaste/ and executes paste. Without additional arguments, autoheight true is set; followed by a success message + hook, cleanup of the temp file.

  3. /listbases
    Lists the player's saved bases.

  4. /deletebase <name>
    Deletes the named base file and removes the entry from the player data.

Permissions

  • myplayerbuilds.use – Required for all chat commands.
  • myplayerbuilds.admin – only for console commands (debug/test). Both are registered during init.

Config

MyPlayerBuilds.json (in the config folder) controls limits, cooldown, backups, and debug logs.

{
  “Maximum bases per player”: 10,
  “Save cooldown in seconds”: 60,
  “Enable automatic backups”: true,
  “Debug mode”: false
}

File locations

  • Player saves: oxide/data/MyPlayerBuilds/<steamid>/<name>.json
  • CopyPaste exchange: oxide/data/copypaste/<name>.json
    Process: When saving, the CopyPaste JSON is copied (not moved) to the player folder; when loading, it is temporarily written to the CopyPaste directory and then cleaned up.

Console (Admin)

  • myplayerbuilds.debug on|off – Toggle debug logs.
  • myplayerbuilds.testload <playerId> <baseName> – Check file/existence/size, content preview (first 200 characters).
  • myplayerbuilds.listsaves <playerId> – List all saved bases for a player.

API (for other plugins)

  • SavePlayerBuild(userId, baseName, buildData) : bool
  • GetPlayerBuild(userId, baseName) : string|null
  • GetPlayerBuilds(userId) : List<string>

Multilingual Support

English + German out-of-the-box (lang keys stored in the code).


load, run, enjoy 💝