From 0d34d7579d363e0e73074fd116b362101af6ef95 Mon Sep 17 00:00:00 2001 From: Leonid Date: Mon, 5 Jul 2021 02:46:00 +0700 Subject: [PATCH] Fix unable to get kit without a Economy plugin --- Kits/API/Kit.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Kits/API/Kit.cs b/Kits/API/Kit.cs index e82dedc..84b56c0 100644 --- a/Kits/API/Kit.cs +++ b/Kits/API/Kit.cs @@ -79,8 +79,11 @@ public virtual async Task GiveKitToPlayer(IPlayerUser playerUser, IServiceProvid } } - await economyProvider.UpdateBalanceAsync(playerUser.Id, playerUser.Type, Money, + if (Money != 0) + { + await economyProvider.UpdateBalanceAsync(playerUser.Id, playerUser.Type, Money, stringLocalizer["commands:kit:balanceUpdateReason:got"]); + } } } -} \ No newline at end of file +}