Merge branch 'general-devel' of github.com:TShock/TShock into general-devel
This commit is contained in:
commit
a766f1e5d9
3 changed files with 16 additions and 10 deletions
|
|
@ -69,7 +69,8 @@ namespace TShockAPI
|
|||
|
||||
foreach (TSPlayer player in TShock.Players)
|
||||
{
|
||||
if (player.IsLoggedIn)
|
||||
// prevent null point exceptions
|
||||
if (player != null && player.IsLoggedIn)
|
||||
{
|
||||
TShock.InventoryDB.InsertPlayerData(player);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -618,6 +618,7 @@ namespace TShockAPI.DB
|
|||
DisableBuild = true;
|
||||
WorldID = string.Empty;
|
||||
AllowedIDs = new List<int>();
|
||||
AllowedGroups = new List<string>();
|
||||
}
|
||||
|
||||
public bool InArea(Rectangle point)
|
||||
|
|
@ -662,15 +663,19 @@ namespace TShockAPI.DB
|
|||
AllowedIDs = id_list;
|
||||
}
|
||||
|
||||
public void SetAllowedGroups( String groups )
|
||||
{
|
||||
List<String> groupArr = groups.Split(',').ToList();
|
||||
|
||||
for (int i = 0; i < groupArr.Count; i++)
|
||||
groupArr[i] = groupArr[i].Trim();
|
||||
public void SetAllowedGroups( String groups )
|
||||
{
|
||||
// prevent null pointer exceptions
|
||||
if (!string.IsNullOrEmpty(groups))
|
||||
{
|
||||
List<String> groupArr = groups.Split(',').ToList();
|
||||
|
||||
AllowedGroups = groupArr;
|
||||
}
|
||||
for (int i = 0; i < groupArr.Count; i++)
|
||||
groupArr[i] = groupArr[i].Trim();
|
||||
|
||||
AllowedGroups = groupArr;
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveID(int id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ namespace TShockAPI
|
|||
public override void SendMessage(string msg, byte red, byte green, byte blue)
|
||||
{
|
||||
Console.WriteLine(msg);
|
||||
RconHandler.Response += msg + "\n";
|
||||
//RconHandler.Response += msg + "\n";
|
||||
}
|
||||
|
||||
public void SetFullMoon(bool fullmoon)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue