Exemple #1
0
        public HubLevel(SkyCoreAPI plugin, string gameId, string levelPath, GameLevelInfo gameLevelInfo, bool modifiable = false) :
            base(plugin, "hub", gameId, levelPath, gameLevelInfo, modifiable)
        {
            AddPendingTask(() =>
            {
                PlayerLocation portalInfoLocation = new PlayerLocation(256.5, 79.5, 276.5);

                const string hologramContent = "  §d§lSkytonia§r §f§lNetwork§r" + "\n" +
                                               " §7Enter the portal and§r" + "\n" +
                                               "§7enjoy your adventure!§r" + "\n" +
                                               "     §ewww.skytonia.com§r";

                new Hologram(hologramContent, this, portalInfoLocation).SpawnEntity();

                RunnableTask.RunTaskLater(() =>
                {
                    try
                    {
                        PlayerNPC.SpawnAllHubNPCs(this);

                        //SpawnHubMaps();
                    }
                    catch (Exception e)
                    {
                        BugSnagUtil.ReportBug(e, this);
                    }
                }, 250);
            });
        }