Profiles
A profile is a player's character slot — its own archetypes, levels, learned spells, talents, point pools, and (optionally) its own inventory and Vault balance. Players can have multiple profiles and switch between them; everything that's profile-scoped resets to that profile's saved state on switch.
Configuration
All profile settings live in config-rpg.yml under Configuration.Profiles:
Configuration:
Profiles:
MaxProfiles: 1 # How many profiles a player can have
AutoCreateFirstProfile: true # Auto-create the first profile when a player joins
ProfileLoading: LOAD_LAST # LOAD_LAST, FORCE_SELECTION, or NONE
ProfileSelectionMenu: profile_select # Menu used to pick a profile
SaveInventoryPerProfile: false # Per-profile inventory snapshots
SaveBalancePerProfile: false # Per-profile Vault balance snapshots
# SwapRules: ... # See [Swap Rules](/Archetypes/Swap-Rules)
# DeathControl: ... # See [Death Control](/Death-Control)
| Option | Description | Default |
|---|---|---|
MaxProfiles |
Maximum number of profile slots a player can have. | 1 |
AutoCreateFirstProfile |
If true, the first profile slot is created automatically the first time a player joins. |
true |
ProfileLoading |
How the active profile is selected on join. LOAD_LAST reloads the last-used profile; FORCE_SELECTION opens the selection menu; NONE waits for setActiveRPGProfile. |
LOAD_LAST |
ProfileSelectionMenu |
The menu shown for profile selection. | profile_select |
SaveInventoryPerProfile |
If true, each profile keeps its own inventory across switches. See Per-Profile Inventory. |
false |
SaveBalancePerProfile |
If true, each profile keeps its own Vault balance across switches. See Per-Profile Balance. |
false |
Per-Profile Inventory
When SaveInventoryPerProfile: true, each profile gets its own snapshot of the player's inventory. The snapshot covers:
- Main inventory (slots 9–35)
- Hotbar (slots 0–8)
- Armor slots
- Offhand
Ender chests, achievements, and statistics are not part of the snapshot — they remain shared across profiles by Bukkit.
How switching works
| Step | What happens |
|---|---|
| 1 | The outgoing profile captures the player's current inventory before unloading. |
| 2 | The incoming profile is loaded. |
| 3 | If the incoming profile has a saved inventory snapshot, it's applied to the player. First-time activations keep whatever the player has on them — nothing is wiped. |
This means there's a smooth transition the first time a profile is used: the player walks into their new profile slot wearing what they were wearing, and from that point on the inventory is profile-scoped.
Storage
- JSON storage keeps the snapshot inline with the profile JSON.
- MySQL storage uses a dedicated
mythicrpg_profile_inventorytable (auto-created on first boot via migrationprofile-inventory-snapshot-table).
Disabling
Setting SaveInventoryPerProfile: false after it's been on does not delete existing snapshots from storage. They're simply ignored, and inventories become shared again. Re-enabling restores the previous behavior.
Per-Profile Balance
When SaveBalancePerProfile: true, each profile keeps its own Vault economy balance. This requires Vault (or a compatible economy provider) installed; if Vault isn't available the option is silently a no-op.
How switching works
| Step | What happens |
|---|---|
| 1 | The outgoing profile captures the player's current Vault balance. |
| 2 | The incoming profile is loaded. |
| 3 | If the incoming profile has a saved balance snapshot, the player's Vault account is brought to that balance via deposit / withdraw. First-time activations keep whatever balance the player has — nothing is reset. |
Because Vault is the source of truth for balance, the snapshot is applied as a delta rather than a hard set: the deposit / withdraw goes through Vault as a normal transaction. Other plugins listening to Vault events will see the change.
Interaction with Vault-cost SwapRules
If SwapRules charges Vault currency on swap, the cost is deducted from the outgoing profile's balance before the snapshot is captured — so the cost is paid by the profile being left, not the one being entered.
Storage
The balance snapshot is stored in the same place as the inventory snapshot — inline with the profile in JSON storage, or in the mythicrpg_profile_inventory table (column balance_snapshot) under MySQL. The column is added automatically on first boot via migration profile-balance-snapshot-column.
Mechanics
| Mechanic | What it does |
|---|---|
setActiveRPGProfile |
Switches the casting player's active profile slot |
Conditions
| Condition | What it checks |
|---|---|
profileSlot |
The slot of the player's currently-active profile |
See also
- Swap Rules — controlling how archetype level / xp behave on swap, plus swap costs and cooldowns
- Death Control — drop rules, XP loss rules, and graveyards