Fix an itemban issue due to localization
This commit is contained in:
parent
34116cf5c4
commit
85b0b7bc6a
2 changed files with 3 additions and 3 deletions
|
|
@ -65,7 +65,7 @@ namespace TShockAPI.DB
|
|||
try
|
||||
{
|
||||
database.Query("INSERT INTO ItemBans (ItemName, AllowedGroups) VALUES (@0, @1);",
|
||||
TShock.Utils.GetItemByName(itemname)[0].Name, "");
|
||||
itemname, "");
|
||||
if (!ItemIsBanned(itemname, null))
|
||||
ItemBans.Add(new ItemBan(itemname));
|
||||
}
|
||||
|
|
@ -81,7 +81,7 @@ namespace TShockAPI.DB
|
|||
return;
|
||||
try
|
||||
{
|
||||
database.Query("DELETE FROM ItemBans WHERE ItemName=@0;", TShock.Utils.GetItemByName(itemname)[0].Name);
|
||||
database.Query("DELETE FROM ItemBans WHERE ItemName=@0;", itemname);
|
||||
ItemBans.Remove(new ItemBan(itemname));
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue