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)
|
foreach (TSPlayer player in TShock.Players)
|
||||||
{
|
{
|
||||||
if (player.IsLoggedIn)
|
// prevent null point exceptions
|
||||||
|
if (player != null && player.IsLoggedIn)
|
||||||
{
|
{
|
||||||
TShock.InventoryDB.InsertPlayerData(player);
|
TShock.InventoryDB.InsertPlayerData(player);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -618,6 +618,7 @@ namespace TShockAPI.DB
|
||||||
DisableBuild = true;
|
DisableBuild = true;
|
||||||
WorldID = string.Empty;
|
WorldID = string.Empty;
|
||||||
AllowedIDs = new List<int>();
|
AllowedIDs = new List<int>();
|
||||||
|
AllowedGroups = new List<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool InArea(Rectangle point)
|
public bool InArea(Rectangle point)
|
||||||
|
|
@ -662,15 +663,19 @@ namespace TShockAPI.DB
|
||||||
AllowedIDs = id_list;
|
AllowedIDs = id_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetAllowedGroups( String groups )
|
public void SetAllowedGroups( String groups )
|
||||||
{
|
{
|
||||||
List<String> groupArr = groups.Split(',').ToList();
|
// prevent null pointer exceptions
|
||||||
|
if (!string.IsNullOrEmpty(groups))
|
||||||
|
{
|
||||||
|
List<String> groupArr = groups.Split(',').ToList();
|
||||||
|
|
||||||
for (int i = 0; i < groupArr.Count; i++)
|
for (int i = 0; i < groupArr.Count; i++)
|
||||||
groupArr[i] = groupArr[i].Trim();
|
groupArr[i] = groupArr[i].Trim();
|
||||||
|
|
||||||
AllowedGroups = groupArr;
|
AllowedGroups = groupArr;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void RemoveID(int id)
|
public void RemoveID(int id)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,7 @@ namespace TShockAPI
|
||||||
public override void SendMessage(string msg, byte red, byte green, byte blue)
|
public override void SendMessage(string msg, byte red, byte green, byte blue)
|
||||||
{
|
{
|
||||||
Console.WriteLine(msg);
|
Console.WriteLine(msg);
|
||||||
RconHandler.Response += msg + "\n";
|
//RconHandler.Response += msg + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetFullMoon(bool fullmoon)
|
public void SetFullMoon(bool fullmoon)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue