Attempt to fix unit tests.
This commit is contained in:
parent
37c550c167
commit
8f22ca4950
2 changed files with 13 additions and 6 deletions
|
|
@ -106,13 +106,20 @@ namespace TShockAPI.DB
|
|||
}
|
||||
}
|
||||
|
||||
public bool ItemIsBanned(string name)
|
||||
{
|
||||
if (ItemBans.Contains(new ItemBan(name)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool ItemIsBanned(string name, TSPlayer ply)
|
||||
{
|
||||
if (ItemBans.Contains( new ItemBan(name) ) )
|
||||
{
|
||||
ItemBan b = GetItemBanByName(name);
|
||||
Console.WriteLine("Item ban exists");
|
||||
Console.WriteLine( "Can use: {0}",b.HasPermissionToUseItem(ply));
|
||||
return !b.HasPermissionToUseItem(ply);
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue