Ejemplo n.º 1
0
 public void RemoveScoreboard(Scoreboard scoreboard)
 {
     if (!Scoreboards.Contains(scoreboard))
         throw new KeyNotFoundException("This scoreboard is not known to the server.");
     foreach (var client in Server.Clients.Where(c => c.IsLoggedIn))
         client.SendPacket(new CreateScoreboardPacket(scoreboard.Name, scoreboard.DisplayName, true));
     Scoreboards.Remove(scoreboard);
 }
Ejemplo n.º 2
0
 public Scoreboard CreateScoreboard(string name, string displayName)
 {
     var board = new Scoreboard(Server, name, displayName);
     Scoreboards.Add(board);
     foreach (var client in Server.Clients.Where(c => c.IsLoggedIn))
         client.SendPacket(new CreateScoreboardPacket(name, displayName));
     return board;
 }
Ejemplo n.º 3
0
        public Scoreboard CreateScoreboard(string name, string displayName)
        {
            var board = new Scoreboard(Server, name, displayName);

            Scoreboards.Add(board);
            foreach (var client in Server.Clients.Where(c => c.IsLoggedIn))
            {
                client.SendPacket(new CreateScoreboardPacket(name, displayName));
            }
            return(board);
        }
Ejemplo n.º 4
0
 public void RemoveScoreboard(Scoreboard scoreboard)
 {
     if (!Scoreboards.Contains(scoreboard))
     {
         throw new KeyNotFoundException("This scoreboard is not known to the server.");
     }
     foreach (var client in Server.Clients.Where(c => c.IsLoggedIn))
     {
         client.SendPacket(new CreateScoreboardPacket(scoreboard.Name, scoreboard.DisplayName, true));
     }
     Scoreboards.Remove(scoreboard);
 }
Ejemplo n.º 5
0
 public void DisplayScoreboard(Scoreboard scoreboard, DisplayScoreboardPacket.ScoreboardPosition position)
 {
     foreach (var client in Server.Clients.Where(c => c.IsLoggedIn))
         client.SendPacket(new DisplayScoreboardPacket(position, scoreboard.Name));
 }