Ejemplo n.º 1
0
        public static void SendCenteredSubtitle(MiNET.Player player, string content, bool centreText, int fadein, int fadeOut, int stayTime)
        {
            string subtitleString = "";
            int    i = 0;

            while (i++ < 3)
            {
                subtitleString += "§r\n";
            }

            if (centreText)
            {
                i += content.Split('\n').Length;

                subtitleString += TextUtils.Center(content);
            }

            while (i++ < 11)             //Push Up
            {
                subtitleString += "§f\n";
            }

            player.SendTitle("§f", TitleType.AnimationTimes, fadein, fadeOut, stayTime);
            player.SendTitle(subtitleString, TitleType.SubTitle);
            player.SendTitle("§f", TitleType.Title);
        }
Ejemplo n.º 2
0
        public override string GetEndOfGameContent(SkyPlayer player)
        {
            MurderTeam winningTeam = GetWinningTeam();

            //Game still running
            if (winningTeam == null)
            {
                return("");
            }

            return
                ("\n" +
                 TextUtils.Center("§f§lWinner:§r " + ((MurderTeam)winningTeam).TeamPrefix + winningTeam.DisplayName.ToUpper(),
                                  205) + "\n" +
                 TextUtils.Center("§8§m--------------------§r", 205) + "\n" +
                 TextUtils.Center("§9§lDetective:§r §f" + Detective?.Username, 205) +
                 "\n" +
                 TextUtils.Center("§c§lMurderer:§r §f" + Murderer?.Username, 205) +
                 "\n" +
                 "\n");
        }
Ejemplo n.º 3
0
 private void SendNameTag(Player player)
 {
     player.SetNameTag(TextUtils.Center($"{GetNameTag(player)}\n{ChatColors.Red}HP: {ChatColors.White}{player.HealthManager.Hearts}"));
 }
Ejemplo n.º 4
0
 public Package LoginHandler(McpeLogin packet, Player player)
 {
     player.DisplayName = TextUtils.Center($"{GetNameTag(packet.username ?? "")}");
     return(packet);
 }