Added back in region manager.
Added back in spawnmob commands, including the obsolete boss commands.
This commit is contained in:
parent
fda287d78d
commit
88394ac561
6 changed files with 1438 additions and 8 deletions
|
|
@ -51,6 +51,7 @@ namespace TShockAPI
|
|||
public static TSPlayer[] Players = new TSPlayer[Main.maxPlayers];
|
||||
public static BanManager Bans;
|
||||
public static WarpManager Warps;
|
||||
public static RegionManager Regions;
|
||||
public static BackupManager Backups;
|
||||
public static GroupManager Groups;
|
||||
public static UserManager Users;
|
||||
|
|
@ -187,6 +188,7 @@ namespace TShockAPI
|
|||
Backups.Interval = Config.BackupInterval;
|
||||
Bans = new BanManager(DB);
|
||||
Warps = new WarpManager(DB);
|
||||
Regions = new RegionManager(DB);
|
||||
Users = new UserManager(DB);
|
||||
Groups = new GroupManager(DB);
|
||||
Itembans = new ItemManager(DB);
|
||||
|
|
@ -520,6 +522,8 @@ namespace TShockAPI
|
|||
AuthToken = 0;
|
||||
}
|
||||
|
||||
Regions.ReloadAllRegions();
|
||||
|
||||
StatTracker.CheckIn();
|
||||
FixChestStacks();
|
||||
|
||||
|
|
@ -1320,7 +1324,19 @@ namespace TShockAPI
|
|||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!player.Group.HasPermission(Permissions.editspawn) && !Regions.CanBuild(tileX, tileY, player) &&
|
||||
Regions.InArea(tileX, tileY))
|
||||
{
|
||||
if (((DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) - player.RPm) > 2000)
|
||||
{
|
||||
player.SendMessage("This region is protected from changes.", Color.Red);
|
||||
player.RPm = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Config.DisableBuild)
|
||||
{
|
||||
if (!player.Group.HasPermission(Permissions.editspawn))
|
||||
|
|
@ -1363,6 +1379,19 @@ namespace TShockAPI
|
|||
return true;
|
||||
}
|
||||
|
||||
if (!player.Group.HasPermission(Permissions.editspawn) && !Regions.CanBuild(tileX, tileY, player) &&
|
||||
Regions.InArea(tileX, tileY))
|
||||
{
|
||||
|
||||
|
||||
if (((DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) - player.RPm) > 2000)
|
||||
{
|
||||
player.SendMessage("This region is protected from changes.", Color.Red);
|
||||
player.RPm = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Config.DisableBuild)
|
||||
{
|
||||
if (!player.Group.HasPermission(Permissions.editspawn))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue