Move netmodule handling into handlers namespace

Add handler for teleport pylons, and permission for teleport pylons
This commit is contained in:
Chris 2020-06-02 12:59:14 +09:30
parent 4d1fd54a7c
commit 48d610d33f
9 changed files with 401 additions and 152 deletions

View file

@ -37,6 +37,7 @@ namespace TShockAPI
internal sealed class Bouncer
{
internal Handlers.SendTileSquareHandler STSHandler { get; set; }
internal Handlers.NetModules.NetModulePacketHandler NetModuleHandler { get; set; }
/// <summary>Constructor call initializes Bouncer and related functionality.</summary>
/// <returns>A new Bouncer.</returns>
@ -45,6 +46,9 @@ namespace TShockAPI
STSHandler = new Handlers.SendTileSquareHandler();
GetDataHandlers.SendTileSquare += STSHandler.OnReceive;
NetModuleHandler = new Handlers.NetModules.NetModulePacketHandler();
GetDataHandlers.LoadNetModule += NetModuleHandler.OnReceive;
// Setup hooks
GetDataHandlers.GetSection += OnGetSection;
GetDataHandlers.PlayerUpdate += OnPlayerUpdate;