// Unload the entirety of your mod's content, remove any event listeners and undo all hooks.
 public override void Unload()
 {
     Everest.Events.Level.OnLoadEntity -= Level_OnLoadEntity;
     On.Celeste.Player.Update          -= Player_Update;
     MinigameSwitchGatherer.Unload();
     PersistentMiniTextbox.Unload();
 }
        // Set up any hooks, event handlers and your mod in general here.
        // Load runs before Celeste itself has initialized properly.
        public override void Load()
        {
            // Stuff that runs orig(self) always
            /* ************************************************ */
            Everest.Events.Level.OnLoadEntity += Level_OnLoadEntity;
            Everest.Events.Level.OnLoadLevel  += (level, playerIntro, isFromLoader) => this.level = level;
            DreamBlockRNGSyncer.Load();
            MinigameInfinityTrigger.Load();
            On.Celeste.LevelEnter.Go += (orig, session, fromSaveData) => {
                if (IsSIDMadelineParty(session.Area.GetSID()) && !session.Level.Equals(START_ROOM))
                {
                    session.Level        = START_ROOM;
                    session.RespawnPoint = session.GetSpawnPoint(Vector2.Zero);
                    //Player player = level.Tracker.GetEntity<Player>();
                    //sendToStart(player);
                }
                orig(session, fromSaveData);
            };
            On.Celeste.Player.Update     += Player_Update;
            On.Celeste.Level.UnloadLevel += (orig, self) => {
                if (IsSIDMadelineParty(self.Session.Area.GetSID()))
                {
                    TextMenu menu = self.Entities.FindFirst <TextMenu>();
                    if (menu != null)
                    {
                        self.PauseMainMenuOpen = false;
                        menu.RemoveSelf();
                        self.Paused = false;
                    }
                }
                orig(self);
            };
            MinigameSwitchGatherer.Load();
            BoardController.Load();
            TiebreakerController.Load();
            PersistentMiniTextbox.Load();
            TextMenuPlus.Load();

            MultiplayerSingleton.Instance.RegisterHandler <Party>(HandleParty);
            MultiplayerSingleton.Instance.RegisterHandler <MinigameEnd>(HandleMinigameEnd);
            MultiplayerSingleton.Instance.RegisterHandler <MinigameStatus>(HandleMinigameStatus);
            MultiplayerSingleton.Instance.RegisterHandler <RandomSeed>(HandleRandomSeed);
        }