Introduce SoftcoreOnly config option to allow only softcore characters
to connect.
This commit is contained in:
parent
dcf1f07ff9
commit
a40effd55e
3 changed files with 11 additions and 0 deletions
|
|
@ -2364,6 +2364,12 @@ namespace TShockAPI
|
|||
NetMessage.SendData((int)PacketTypes.PlayerInfo, -1, args.Player.Index, NetworkText.FromLiteral(args.Player.Name), args.Player.Index);
|
||||
return true;
|
||||
}
|
||||
if (TShock.Config.Settings.SoftcoreOnly && difficulty != 0)
|
||||
{
|
||||
TShock.Log.ConsoleDebug("GetDataHandlers / HandlePlayerInfo rejected softcore required");
|
||||
args.Player.Kick("You need to join with a softcore player.", true, true);
|
||||
return true;
|
||||
}
|
||||
if (TShock.Config.Settings.MediumcoreOnly && difficulty < 1)
|
||||
{
|
||||
TShock.Log.ConsoleDebug("GetDataHandlers / HandlePlayerInfo rejected mediumcore required");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue