protected override void OnEnable() { // here is the part where I think I have to set the PlayerFactory Context.Server.PlayerFactory = new MiniPEPlayerFactory(this); // load important levels lobbyLevel = Context.LevelManager.GetLevel(null, "Default"); // stop block placing and breaking and stop the world time foreach (var level in Context.LevelManager.Levels) { level.BlockBreak += LevelOnBlockBreak; level.BlockPlace += LevelOnBlockPlace; level.IsWorldTimeStarted = false; } // start timer for popups in lobby _popupTimer = new Timer(DoLobbyPopups, null, 1000, 1000); // place a villager in the lobby // Mob (a villager) to teleport to Jump ('n' run) Mob entity = new Mob(15, lobbyLevel) { KnownPosition = new PlayerLocation(new Vector3(-91.3, 5, 501.3)), NameTag = "Jump", }; entity.HealthManager = new VillagerHealthManager(entity, this); entity.SpawnEntity(); // create JumpManager jumpManager = new JumpManager(this); }
public JumpMatch(JumpManager m) { manager = m; // create player list Players = new List <MiniPEPlayer>(); // load the level for the jump n run level = new Level("jump" + manager.getMatchCount(), new AnvilWorldProvider(@"the path")); level.Initialize(); }