Add PlayerPermission hook, replace p.Group.HasPermission by p.HasPermission everywhere possible.
This commit is contained in:
parent
21f16e5908
commit
aa419283a9
13 changed files with 467 additions and 232 deletions
|
|
@ -162,13 +162,13 @@ namespace TShockAPI.DB
|
|||
|
||||
if (!player.IsLoggedIn)
|
||||
return false;
|
||||
|
||||
if ((player.tempGroup != null && player.tempGroup.HasPermission(Permissions.bypassssc)) || player.Group.HasPermission(Permissions.bypassssc))
|
||||
{
|
||||
TShock.Log.ConsoleInfo("Skipping SSC Backup for " + player.User.Name); // Debug code
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (player.HasPermission(Permissions.bypassssc))
|
||||
{
|
||||
TShock.Log.ConsoleInfo("Skipping SSC Backup for " + player.User.Name); // Debug code
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!GetPlayerData(player, player.User.ID).exists)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue