/// <summary> Initialize the handler </summary> public void Initialize() { Sapi.RegisterEntityBehaviorClass("allomancy", typeof(EntityBehaviorAllomancy)); Channel = Sapi.Network.RegisterChannel(MistModSystem.MOD_ID) .RegisterMessageType(typeof(BurnMessage)) .RegisterMessageType(typeof(SelectedMetalMessage)) .RegisterMessageType(typeof(ReplaceAlloHelperEntity)); Channel.SetMessageHandler <BurnMessage>(OnBurnMetalMessage); Channel.SetMessageHandler <SelectedMetalMessage>(OnSelectedMetalMessage); Sapi.Event.PlayerJoin += OnPlayerJoin; Sapi.Event.PlayerRespawn += OnPlayerRespawn; Sapi.Event.OnEntitySpawn += OnEntitySpawn; }