Add require login config
This commit is contained in:
parent
5c6d03f9af
commit
40973abb3f
3 changed files with 21 additions and 3 deletions
|
|
@ -728,17 +728,26 @@ namespace TShockAPI
|
|||
|
||||
NetMessage.syncPlayers();
|
||||
|
||||
if (Config.ServerSideInventory && !player.IsLoggedIn)
|
||||
if (Config.RequireLogin)
|
||||
{
|
||||
player.SendMessage("Please /register or /login to play!", Color.Red);
|
||||
}
|
||||
else if (Config.ServerSideInventory)
|
||||
{
|
||||
player.IgnoreActionsForInventory = true;
|
||||
player.SendMessage("Server Side Inventory is enabled! Please /register or /login to play!", Color.Red);
|
||||
}
|
||||
|
||||
if (TShock.Config.PvPMode == "always" && !player.TPlayer.hostile)
|
||||
if (Config.ServerSideInventory)
|
||||
{
|
||||
player.IgnoreActionsForInventory = true;
|
||||
}
|
||||
|
||||
if (Config.PvPMode == "always" && !player.TPlayer.hostile)
|
||||
{
|
||||
player.IgnoreActionsForPvP = true;
|
||||
player.SendMessage("PvP is forced! Enable PvP else you can't move or do anything!", Color.Red);
|
||||
}
|
||||
|
||||
if (player.Group.HasPermission(Permissions.causeevents) && Config.InfiniteInvasion)
|
||||
{
|
||||
StartInvasion();
|
||||
|
|
@ -1177,6 +1186,8 @@ namespace TShockAPI
|
|||
check = true;
|
||||
if (player.IgnoreActionsForCheating)
|
||||
check = true;
|
||||
if (!player.IsLoggedIn && Config.RequireLogin)
|
||||
check = true;
|
||||
return check;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue