Permission magic strings removed
This commit is contained in:
parent
fc03e72c77
commit
b06ec57819
8 changed files with 243 additions and 89 deletions
|
|
@ -400,7 +400,7 @@ namespace TShockAPI
|
|||
player.Group = Users.GetGroupForIP(player.IP);
|
||||
}
|
||||
|
||||
if (Tools.ActivePlayers() + 1 > Config.MaxSlots && !player.Group.HasPermission("reservedslot"))
|
||||
if (Tools.ActivePlayers() + 1 > Config.MaxSlots && !player.Group.HasPermission(Permissions.reservedslot))
|
||||
{
|
||||
Tools.ForceKick(player, Config.ServerFullReason);
|
||||
handler.Handled = true;
|
||||
|
|
@ -466,7 +466,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (tsplr.Group.HasPermission("adminchat") && !text.StartsWith("/") && Config.AdminChatEnabled)
|
||||
if (tsplr.Group.HasPermission(Permissions.adminchat) && !text.StartsWith("/") && Config.AdminChatEnabled)
|
||||
{
|
||||
Tools.Broadcast(Config.AdminChatPrefix + "<" + tsplr.Name + "> " + text,
|
||||
tsplr.Group.R, tsplr.Group.G,
|
||||
|
|
@ -579,7 +579,7 @@ namespace TShockAPI
|
|||
|
||||
// Stop accepting updates from player as this player is going to be kicked/banned during OnUpdate (different thread so can produce race conditions)
|
||||
if ((Config.BanKillTileAbusers || Config.KickKillTileAbusers) &&
|
||||
player.TileThreshold >= Config.TileThreshold && !player.Group.HasPermission("ignoregriefdetection"))
|
||||
player.TileThreshold >= Config.TileThreshold && !player.Group.HasPermission(Permissions.ignoregriefdetection))
|
||||
{
|
||||
Log.Debug("Rejecting " + type + " from " + player.Name + " as this player is about to be kicked");
|
||||
e.Handled = true;
|
||||
|
|
@ -627,7 +627,7 @@ namespace TShockAPI
|
|||
"PvP is forced! Enable PvP else you can't deal damage to other people. (People can kill you)",
|
||||
Color.Red);
|
||||
}
|
||||
if (player.Group.HasPermission("causeevents") && Config.InfiniteInvasion)
|
||||
if (player.Group.HasPermission(Permissions.causeevents) && Config.InfiniteInvasion)
|
||||
{
|
||||
StartInvasion();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue