tweak(Server/Classes/Player) Lowercase account check

Currently the docs say:`Money` and `Bank`, This will currently cause an error when used, better to accept both than change the docs
This commit is contained in:
Kasey Fitton
2024-07-08 19:34:43 +01:00
committed by GitHub
parent c80916c3e3
commit 572095bd09
+3 -1
View File
@@ -191,8 +191,10 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
---@param account string
---@return table | nil
function self.getAccount(account)
account = string.lower(account)
for i = 1, #self.accounts do
if self.accounts[i].name == account then
local accountName = string.lower(self.accounts[i].name)
if accountName == account then
return self.accounts[i]
end
end