From 755d0dd1630eb10458b6f9fddd5658f112b59dd4 Mon Sep 17 00:00:00 2001 From: ShimmyMySherbet Date: Mon, 5 Dec 2022 00:34:38 +1000 Subject: [PATCH] Fix /VaultAlias messages --- SherbetVaults/Commands/VaultAliasCommand.cs | 5 ++++- SherbetVaults/Models/Config/Translations.cs | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/SherbetVaults/Commands/VaultAliasCommand.cs b/SherbetVaults/Commands/VaultAliasCommand.cs index 37c2a2d..3093b06 100644 --- a/SherbetVaults/Commands/VaultAliasCommand.cs +++ b/SherbetVaults/Commands/VaultAliasCommand.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using System.Transactions; using Cysharp.Threading.Tasks; using Rocket.API; using RocketExtensions.Models; @@ -59,7 +60,9 @@ public override async UniTask Execute(CommandContext context) await Plugin.Database.Aliases.SetAliasAsync(context.PlayerID, vaultID, vaultAlias); - await context.ReplyKeyAsync("VaultAliases_Set", string.Join(", ", Aliases), vaultConfig.VaultID); + var newAliases = currentAliases.Append(vaultAlias); + + await context.ReplyKeyAsync("VaultAliases_Set", string.Join(", ", newAliases), vaultConfig.VaultID); return; case "remove": diff --git a/SherbetVaults/Models/Config/Translations.cs b/SherbetVaults/Models/Config/Translations.cs index 6adb31d..de6edaa 100644 --- a/SherbetVaults/Models/Config/Translations.cs +++ b/SherbetVaults/Models/Config/Translations.cs @@ -13,10 +13,10 @@ public partial class SherbetVaultsPlugin { "Vaults_List", "[color=green]Your vaults: {0}[/color]" }, { "WipeVault_Wiped", "[color=green]Wiped {0} items from {1}'s vault {2}[/color]" }, { "VaultAliases_MaxReached", "[color=red]Max vault aliases reached[/color]" }, - { "VaultAliases_Set", "[color=cyan]Vault alias created: {0}➔{1}[/color]" }, - { "VaultAliases_Removed", "[color=cyan]Removed alias {0}[/color]" }, + { "VaultAliases_Set", "[color=#00ffff]Vault alias created: {0} -> {1}[/color]" }, + { "VaultAliases_Removed", "[color=#00ffff]Removed alias {0}[/color]" }, { "VaultAliases_Remove_NotFound", "[color=cyan]No alias by that name found[/color]" }, - { "VaultAliases_List", "Aliases: {1}" }, + { "VaultAliases_List", "[color=#00ffff]Aliases: {1}[/color]" }, { "Restrictions_Blacklisted", "[color=red]You cannot store that item in your vault[/color]" }, { "VaultAliases_Disabled", "[color=red]Vault aliases are disabled on this server[/color]" } };