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
|
|
@ -191,7 +191,7 @@ namespace TShockAPI
|
|||
TSPlayer.Server.SendMessage(log, color);
|
||||
foreach (TSPlayer player in TShock.Players)
|
||||
{
|
||||
if (player != null && player != excludedPlayer && player.Active && player.Group.HasPermission(Permissions.logs) &&
|
||||
if (player != null && player != excludedPlayer && player.Active && player.HasPermission(Permissions.logs) &&
|
||||
player.DisplayLogs && TShock.Config.DisableSpewLogs == false)
|
||||
player.SendMessage(log, color);
|
||||
}
|
||||
|
|
@ -610,7 +610,7 @@ namespace TShockAPI
|
|||
{
|
||||
if (!player.ConnectionAlive)
|
||||
return true;
|
||||
if (force || !player.Group.HasPermission(Permissions.immunetokick))
|
||||
if (force || !player.HasPermission(Permissions.immunetokick))
|
||||
{
|
||||
string playerName = player.Name;
|
||||
player.SilentKickInProgress = silent;
|
||||
|
|
@ -642,7 +642,7 @@ namespace TShockAPI
|
|||
{
|
||||
if (!player.ConnectionAlive)
|
||||
return true;
|
||||
if (force || !player.Group.HasPermission(Permissions.immunetoban))
|
||||
if (force || !player.HasPermission(Permissions.immunetoban))
|
||||
{
|
||||
string ip = player.IP;
|
||||
string uuid = player.UUID;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue