Sueta

PlayerVaults999

1.0.3

PlayerVaults999 revolutionizes in-game storage by offering a seamlessly integrated vault system for Minecraft servers

·Plugin
Tested MC versions
1.21

Features

  • A clickable vault menu that shows every vault a player can use.
  • Persistent vaults: contents are saved when a vault is closed, on a timer, when a player leaves, and on shutdown.
  • Per-vault custom names and icons shown in the menu.
  • A separate sorting screen with sorting by name, by type and by quantity.
  • Item search across a player's vaults with clickable results.
  • Buying locked vaults with an economy, without requiring Vault to be installed.
  • Administrator tools for backups, wiping, read-only viewing and reloading.
  • Every message, menu title and icon can be changed in the configuration.
  • Vault access can be handed out per vault number, or all at once.

How vaults work

  • A player's vaults are numbered from 1 up to max_vaults.
  • Access is granted per vault number with a permission, or all at once with the "all vaults" permission, or by buying the vault.
  • Running /pv opens the vault menu. The menu shows one icon per vault, how many items it holds, its custom name and its custom icon.
  • In the menu, left-click a vault to open it and right-click it to open its sorting screen.
  • Locked vaults are shown greyed out. When an economy is available they can be clicked to buy them, and they stay unlocked after purchase.
  • Vault contents slide into place automatically when a vault is opened, sorted or cleared, and everything is stored safely between restarts.

Commands

CommandWhat it does
/pvOpens the vault menu.
/pv menuOpens the vault menu.
/pv <number>Opens one of your vaults by number.
/pv listLists the vaults you can access.
/pv search <item>Searches all your vaults for an item. The results are clickable and open the matching vault.
/pv sort <vault>Opens the sorting screen for a vault.
/pv clear <vault>Empties one of your vaults.
/pv buy <vault>Buys a locked vault when an economy is available.
/pv name <vault> <name>Renames a vault. Use clear as the name to remove a custom name.
/pv icon <vault> <item>Sets the menu icon for a vault.
/pv admin <player> <vault>Opens another player's vault so it can be edited.
/pv inspect <player> <vault>Opens another player's vault as a read-only view.
/pv backup <player>Creates a dated backup copy of a player's vault data.
/pv wipe <player> [vault]Clears one or all of a player's vaults. A backup is always taken first.
/pv reloadReloads the configuration without restarting the server.

Tab completion is available for every command, sub-command, vault number, player name and item name.

Permissions

PermissionDefaultWhat it allows
playervaults.useEveryoneUsing the /pv command and the vault menu.
playervaults.vaults.<number>Vault 1 onlyAccess to one vault number.
playervaults.vaults.allOperatorsAccess to every vault.
playervaults.adminOperatorsOpening and editing any player's vault, and the administrator commands.
playervaults.clearOperatorsClearing a vault.
playervaults.listEveryoneListing available vaults.
playervaults.searchEveryoneSearching vaults for items.
playervaults.sortEveryoneSorting a vault.
playervaults.renameEveryoneRenaming a vault.
playervaults.iconEveryoneChanging a vault's menu icon.
playervaults.economyEveryoneBuying locked vaults.
playervaults.inspectOperatorsViewing another player's vault read-only.
playervaults.backupOperatorsCreating vault backups.
playervaults.wipeOperatorsWiping vault data.
playervaults.reloadOperatorsReloading the configuration.

Vault permissions are provided for numbers 1 to 10 by default. If max_vaults is higher than 10,
give those players the "all vaults" permission, or add matching vault permissions.

Economy

Vaults can be sold once the Vault plugin and an economy plugin are installed.

  • When an economy is available, locked vaults in the menu show their price and can be bought with a click, or with /pv buy <vault>.
  • The price of vault number n is base_price + price_increase * (n - 1).
  • Bought vaults stay unlocked for that player and are remembered between restarts.
  • If Vault or an economy plugin is missing, the plugin runs normally. Players who try to buy a vault are simply told that Vault is required, and locked vaults show as locked instead of purchasable.

Configuration

Every option lives in the plugin's config.yml. Colour codes use &, for example &a is green.
Available placeholders are %prefix%, %player%, %vault%, %name%, %count%, %amount%,
%item%, %price%, %page%, %pages%, %file%, %icon% and %max%.

General

OptionDefaultWhat changing it does
max_vaults10The highest vault number a player can have. Vaults are numbered from 1 up to this value.
vault_size54The number of storage slots in a vault. Must be a multiple of 9, between 9 and 54. Applies to vaults created after the change; existing vaults keep their size so no items are lost.
save_interval300How often, in seconds, changed vaults are saved automatically. Set to 0 to turn automatic saving off; vaults are still saved when closed and on shutdown.
preload_offline_vaultsfalseWhen true, vault information for offline players is loaded at startup.
vault_title&a%player%'s Vault #%vault%The title shown at the top of a vault.
sound_on_openUI_BUTTON_CLICKThe sound played when a vault is opened. Accepts a sound name or a namespaced sound such as minecraft:ui.button.click. Leave blank for no sound.

Menu

OptionDefaultWhat changing it does
menu.title&8Your VaultsThe title of the vault menu.
menu.vault_iconCHESTThe icon used for a vault the player can open. Vaults with a custom icon use that instead.
menu.locked_iconBARRIERThe icon used for a vault the player cannot open and cannot buy.
menu.buy_iconGOLD_INGOTThe icon used for a vault the player can buy.
menu.fill_empty_slotstrueWhen true, unused menu slots are filled with the filler item.
menu.fillerGRAY_STAINED_GLASS_PANEThe item used to fill unused menu slots.

Sorting and screens

OptionDefaultWhat changing it does
sort.title&8Sort Vault #%vault%The title of the sorting screen.
sort.soundUI_BUTTON_CLICKThe sound played when a vault is sorted. Leave blank for no sound.
buy.title&8Purchase Vault #%vault%The title of the purchase confirmation screen.
inspect.title&8Viewing %player% #%vault%The title of the read-only screen used by /pv inspect.

Economy

OptionDefaultWhat changing it does
economy.enabledtrueSet to false to disable buying vaults even when an economy is available.
economy.base_price1000.0The cost of vault number 1. Higher vaults cost more.
economy.price_increase1000.0Added to the price for each vault number above 1. With the defaults, vault 2 costs 2000.

Messages

Every message players see can be changed in the messages section.

OptionDefaultWhen it is shown
prefix&8[&aVaults&8] &rAdded in front of every message below.
player-only&cThis command can only be used by players.When a command that needs a player is run from the console.
no-permission&cYou don't have permission to do that.When a command is run without the needed permission.
player-not-found&cPlayer not found.When an administrator command names an unknown player.
invalid-number&cPlease enter a valid vault number.When a non-number is given as a vault number.
vault-range&cVault number must be between 1 and %max%.When a vault number is outside the allowed range.
vault-locked&cYou don't have access to that vault.When a player tries to open a vault they cannot access.
cleared&aVault #%vault% has been cleared.After clearing a vault.
sorted&aVault #%vault% has been sorted.After sorting a vault.
usage&cUsage: /pv [...]When a command is missing arguments.
list-header&aYour available vaults:Above the /pv list results.
list-entry&7- Vault #%vault% %name%One line per vault in /pv list.
search-header&aFound items:Above the /pv search results.
search-entry&aVault #%vault% &7- %item% x%amount%One clickable line per matching item.
search-hover&7Click to open vault #%vault%Shown when hovering a search result.
search-none&cNo items found matching that name.When a search finds nothing.
search-hint&7Click a result to open that vault.Below the /pv search results.
menu-page&ePage %page%/%pages%The page indicator in the menu.
menu-prev&aPrevious PageThe previous-page button in the menu.
menu-next&aNext PageThe next-page button in the menu.
vault-item-name&aVault #%vault%The name of a vault icon in the menu when it has no custom name.
vault-item-loreitem count and click hintsThe hover text of a vault icon in the menu.
locked-item-name&cVault #%vault% &7(Locked)The name of a locked vault icon.
locked-item-loreprice and purchase hintThe hover text of a vault that can be bought.
locked-no-economy-loreaccess hintThe hover text of a vault that cannot be bought.
sort-name&aSort by NameThe sort-by-name button.
sort-type&aSort by TypeThe sort-by-type button.
sort-quantity&aSort by QuantityThe sort-by-quantity button.
sort-close&cCloseThe close button on the sorting screen.
buy-confirm&aConfirm PurchaseThe confirm button on the purchase screen.
buy-confirm-loreprice lineThe hover text of the confirm button.
buy-cancel&cCancelThe cancel button on the purchase screen.
buy-success&aYou unlocked vault #%vault%!After buying a vault.
buy-failed&cYou cannot afford that.When a purchase fails.
buy-already&eYou already have access to vault #%vault%.When buying a vault you already have.
buy-no-economy&cThis feature requires the Vault plugin...When an economy command is used without Vault.
name-set&aVault #%vault% renamed to &f%name%&a.After renaming a vault.
icon-set&aVault #%vault% icon set to &f%icon%&a.After changing a vault icon.
icon-invalid&cInvalid item name: %icon%When an unknown item name is given as an icon.
reloaded&aConfiguration reloaded.After /pv reload.
backup-done&aBackup created: &f%file%After creating a backup.
backup-none&cNo vault data was found for that player.When there is nothing to back up.
wipe-done&aVault data wiped for &f%player%&a.After wiping vaults.

Installation

  1. Place the plugin file in the server's plugins folder.
  2. Start the server once to create the configuration.
  3. Optionally install Vault and an economy plugin to enable buying vaults.
  4. Adjust config.yml to taste and run /pv reload to apply the changes.

Similar projects

Plugin →